CN102314340A - Method for closing camera - Google Patents

Method for closing camera Download PDF

Info

Publication number
CN102314340A
CN102314340A CN2011100599828A CN201110059982A CN102314340A CN 102314340 A CN102314340 A CN 102314340A CN 2011100599828 A CN2011100599828 A CN 2011100599828A CN 201110059982 A CN201110059982 A CN 201110059982A CN 102314340 A CN102314340 A CN 102314340A
Authority
CN
China
Prior art keywords
camera
webpage
flash
closed
close
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011100599828A
Other languages
Chinese (zh)
Other versions
CN102314340B (en
Inventor
胡加明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong Construction Engineering Co ltd
Original Assignee
Suzhou Codyy Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Codyy Network Technology Co Ltd filed Critical Suzhou Codyy Network Technology Co Ltd
Priority to CN2011100599828A priority Critical patent/CN102314340B/en
Publication of CN102314340A publication Critical patent/CN102314340A/en
Application granted granted Critical
Publication of CN102314340B publication Critical patent/CN102314340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Studio Devices (AREA)

Abstract

The invention belongs to the technical field of networks, in particular relates to a method for closing a camera, comprising the following steps: a source user opens a home webpage, the webpage uploads a Flash insert, Flash calls related APIs (Application Program Interfaces) to open the camera, the user clicks to execute operations such as closing related functions of the camera or closing the webpage and the like when requiring closing operation of the camera in webpage use, the webpage waits for successful state alteration of the camera in a circulating way, related APIs of the Flash are called to carry out closing treatment on the camera, the successful closing state is altered after the closing is successful, and after the state of the webpage is detected, the webpage automatically quits circulation to wait for following treatment, thereby closing the camera. The method can be completely realized based on the webpage without the support of a third part application system, can be used for effectively preventing the camera from being occupied without reasons and ensuring the safety of the privacy of the user and is convenient, rapid and efficient.

Description

A kind of method that realizes that camera is closed
Technical field
The invention belongs to networking technology area, relate in particular to a kind of method that realizes that camera is closed.
Background technology
The development of, hardware soft along with the internet, people use multimedia technology more and more in daily interchange, and such as mobile phone, phone, video conference etc., especially computer based video communication technology enjoys favor especially.At present, the video communication majority needs down loading mounting software, also has some products can on webpage, realize video communication certainly.But there is a serious weak point in prior art, promptly neither one safety, close the method for camera completely.For example, the user after using camera on the computing machine, close the camera operation after, the occupied situation of camera can appear when re-using.If the camera of warning light is arranged; After the user has finished video calling; The situation that the camera warning light still is in opening can occur, that is to say, as long as the user does not close all webpages relevant with opening the camera process fully; Camera is just still reading local image, and might local image be continued to send to other network-side.
This situation occurs and be because when calling local camera through webpage connector, webpage connector is in shared user mode when browser loads, and each webpage that promptly same process is opened is shared a control.At this moment, the user closes one of them webpage, and former webpage still is in opening, thereby causes camera thoroughly not closed.The user is in video call process, and the image stream that camera is issued outward is in issued state always, if camera can not effectively be closed, very easily reveals user's privacy.Especially in internet, applications such as long-distance education, video conference, this deficiency will seriously jeopardize user's personal information security, influence the enthusiasm of user experience and internet usage product.
Summary of the invention
The invention provides a kind of method that realizes that camera is closed, realized need not to download any control, in time, effectively close camera.
In order to achieve the above object, technical scheme of the present invention is:
Realize the method that camera is closed on a kind of webpage, may further comprise the steps:
1) source user is opened the our station webpage, and webpage loads the Flash plug-in unit, and the Flash plug-in unit calls local camera;
2) user clicks and to close camera or close the page etc. and close camera when handling operation, and the invoking web page function carries out delay process automatically, and camera is closed success status carries out cycle detection, webpage is in wait for camera success closed condition;
3) webpage calls the relevant API of Flash, and camera is closed processing, camera is thoroughly closed, and modification webpage camera closed condition is successfully;
4) the webpage delay function withdraws from the circular wait state after detecting camera success closed condition automatically, and carries out the follow-up handled of webpage such as page close, thereby realizes closing based on the webpage camera.
In the technique scheme, step 1) comprises following process:
1a) source user is opened the our station webpage, and webpage loads the Flash plug-in unit automatically, when the Flash plug-in unit is opened local camera through calling the Camera.getCamera method, at this moment the camera object of opening is put into the camera array variable;
After 1b) camera is opened; When Flash calls NetStream camera image stream such as is issued, receives, records at operation, operated NetStream and NetConnection object are put into NetStream and NetConnection array variable respectively.
In the technique scheme, step 2) comprise following process:
The user clicks and to close camera or to close the page etc. can close the operation of camera the time, and webpage calls JavaScript delay process function automatically, adds the state judgment mode through circulation or recurrence, lets the page wait for the change of camera success closed condition always.
In the technique scheme, step 3) comprises following process:
3a) webpage is through the camera method for closing of JavaScript function call Flash through the ExternalInterface.addCallback registration;
3b) Flash receive JavaScript close camera instruction after; At first the NetStream array that has existed is carried out traversing operation; Each NetStream object in the array carries out cleaning operation; The attachAudio method of mainly calling the NetStream object is imported null into, the attachAudioCamera method is imported null, key assignments, close method when key assignments, play method when the publish method is imported issue into are imported reception into into, and this NetStream method is changed to null;
3c) the NetConnection array is carried out traversing operation, each the NetConnection object in the array is carried out cleaning operation, mainly call the close method of NetConnection object, and this NetConnection method is changed to null;
3d) the camera object is changed to null; To call the Camera.getCamera method and import null into; The attachCamera method of calling camera demonstration control is imported null, clear method into; And the removeChild method of calling Flash removes camera and shows control from Flash, the ExternalInterface.call method change webpage camera closed condition state that calls Flash is true;
In the technique scheme, step 4) comprises following process:
When JavaScript delay process function detects webpage camera closed condition and is true; Jump out circulation or recurrence through the break key word; Thereby stop the webpage waiting status, let webpage proceed webpage and close and wait other to handle operation, this moment, camera was thoroughly closed.
The present invention compared with prior art has the following advantages:
1) realizes safety, quick, efficient fully based on webpage.
2) utilize the interaction mechanism of webpage and Flash self, call conveniently, the process feedback in time can be guaranteed the complete camera of closing.
3) adopt all vestiges to write down and scan process to camera; Each step operation of guaranteeing camera can both be by accurate monitoring; Situation about missing when thoroughly avoiding closing; To stop the occurring generation of privacy of user, guarantee personal secrets, and can prevent effectively that camera from being taken without reason through the camera leakage problem.
4) realize that principle is simple, fully based on webpage, need not download any plug-in unit, green, environmental protection can be widely used in the internet, applications such as Web conference, long-distance education.
Realize the method that camera is closed on a kind of webpage, be intended to solve after present stage calls local camera through webpage and use, the problem that camera can not be in time, effectively close; This technology need not to download any control, need not the support of third party's application framework and application system, and principle is simple, realizes based on the control of webpage own fully, and is safe, convenient, fast, is a kind of popular technology of truly can popularizing.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is a detail flowchart of the present invention.
Embodiment
Below will and combine embodiment to specify the present invention with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
Realize the method that camera is closed on a kind of webpage, may further comprise the steps:
1) source user is opened the our station webpage, and webpage loads the Flash plug-in unit, and the Flash plug-in unit calls local camera;
2) user clicks and to close camera or close the page etc. and close camera when handling operation, and the invoking web page function carries out delay process automatically, and camera is closed success status carries out cycle detection, webpage is in wait for camera success closed condition;
3) webpage calls the relevant API of Flash, and camera is closed processing, camera is thoroughly closed, and modification webpage camera closed condition is successfully;
4) the webpage delay function withdraws from the circular wait state after detecting camera success closed condition automatically, and carries out the follow-up handled of webpage such as page close, thereby realizes closing based on the webpage camera.
Following further explain method of the present invention:
Referring to Figure of description, source user is opened the our station webpage, and webpage loads the Flash plug-in unit automatically, when the Flash plug-in unit is opened local camera through calling the Camera.getCamera method, at this moment the camera object of opening is put into the camera array variable; After camera is opened, when Flash calls NetStream camera image stream such as is issued, receives, records at operation, operated NetStream and NetConnection object are put into NetStream and NetConnection array variable respectively; The user clicks and to close camera or to close the page etc. can close the operation of camera the time, and webpage calls JavaScript delay process function automatically, adds the state judgment mode through circulation or recurrence, lets the page wait for the change of camera success closed condition always; Webpage is through the camera method for closing of JavaScript function call Flash through the ExternalInterface.addCallback registration; Flash receive JavaScript close camera instruction after; At first the NetStream array that has existed is carried out traversing operation; Each NetStream object in the array carries out cleaning operation; The attachAudio method of mainly calling the NetStream object is imported null into, the attachAudioCamera method is imported null, key assignments, close method when key assignments, play method when the publish method is imported issue into are imported reception into into, and this NetStream method is changed to null; The NetConnection array is carried out traversing operation, each the NetConnection object in the array is carried out cleaning operation, mainly call the close method of NetConnection object, and this NetConnection method is changed to null; The camera object is changed to null; To call the Camera.getCamera method and import null into; The attachCamera method of calling camera demonstration control is imported null, clear method into; And the removeChild method of calling Flash removes camera and shows control from Flash, the ExternalInterface.call method change webpage camera closed condition state that calls Flash is true; When JavaScript delay process function detects webpage camera closed condition and is true; Jump out circulation or recurrence through the break key word; Thereby stop the webpage waiting status, let webpage proceed webpage and close and wait other to handle operation, this moment, camera was thoroughly closed.
Fig. 1 is a detail flowchart of the present invention, and detailed step is following:
Step 101: beginning;
Step 102: source user is opened the our station webpage, and webpage loads the Flash plug-in unit, and Flash calls API and opens local camera;
Step 103: the user clicks and to close webpage or other when closing the camera operation, and webpage adopts the circular wait mode to wait for that camera successfully closes;
Step 104: call the relevant API of Flash, camera closed processing, close successfully after, change the camera closed condition;
Step 105: when the camera closed condition was changed into true, webpage withdrawed from circular wait automatically, carried out the webpage subsequent treatment;
Step 106: finish.
Obviously, it is apparent to those skilled in the art that above-mentioned each step of the present invention can realize with the general calculation device; They can concentrate on the single calculation element, perhaps are distributed on the network that a plurality of calculation element forms, alternatively; They can realize with the executable program code of calculation element, thereby, can they be stored in the memory storage and carry out by calculation element; And in some cases; Can carry out step shown or that describe with the order that is different from here, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a method that realizes that camera is closed is characterized in that, may further comprise the steps:
1) source user is opened the our station webpage, and webpage loads the Flash plug-in unit, and the Flash plug-in unit calls local camera;
2) user clicks and to close camera or close the page etc. and close camera when handling operation, and the invoking web page function carries out delay process automatically, and camera is closed success status carries out cycle detection, webpage is in wait for camera success closed condition;
3) webpage calls the relevant API of Flash, and camera is closed processing, camera is thoroughly closed, and modification webpage camera closed condition is successfully;
4) the webpage delay function withdraws from the circular wait state after detecting camera success closed condition automatically, and carries out the follow-up handled of webpage such as page close, thereby realizes closing based on the webpage camera.
2. the method for claim 1 is characterized in that, wherein step 1) comprises following process:
1a) source user is opened the our station webpage, and webpage loads the Flash plug-in unit automatically, when the Flash plug-in unit is opened local camera through calling the Camera.getCamera method, at this moment the camera object of opening is put into the camera array variable;
After 1b) camera is opened; When Flash calls NetStream camera image stream such as is issued, receives, records at operation, operated NetStream and NetConnection object are put into NetStream and NetConnection array variable respectively.
3. the method for claim 1 is characterized in that, wherein step 2) comprise following process:
The user clicks and closes camera or close the page, and when closing the operation of camera, webpage calls JavaScript delay process function automatically, adds the state judgment mode through circulation or recurrence, lets the page wait for the change of camera success closed condition always.
4. the method for claim 1 is characterized in that, wherein step 3) comprises following process:
3a) webpage is through the camera method for closing of JavaScript function call Flash through the ExternalInterface.addCallback registration;
3b) Flash receive JavaScript close camera instruction after; At first the NetStream array that has existed is carried out traversing operation; Each NetStream object in the array carries out cleaning operation; The attachAudio method of mainly calling the NetStream object is imported null into, the attachAudioCamera method is imported null, key assignments, close method when key assignments, play method when the publish method is imported issue into are imported reception into into, and this NetStream method is changed to null;
3c) the NetConnection array is carried out traversing operation, each the NetConnection object in the array is carried out cleaning operation, mainly call the close method of NetConnection object, and this NetConnection method is changed to null;
3d) the camera object is changed to null; To call the Camera.getCamera method and import null into; The attachCamera method of calling camera demonstration control is imported null, clear method into; And the removeChild method of calling Flash removes camera and shows control from Flash, the ExternalInterface.call method change webpage camera closed condition state that calls Flash is true.
5. the method for claim 1 is characterized in that, wherein step 4) comprises following process:
When JavaScript delay process function detects webpage camera closed condition and is true; Jump out circulation or recurrence through the break key word; Thereby stop the webpage waiting status, let webpage proceed webpage and close and wait other to handle operation, this moment, camera was thoroughly closed.
6. method that realizes that camera is closed, it is characterized in that: when source user was closed video equipment through webpage, the invoking web page function carried out delay process, and said video equipment closed condition is carried out cycle detection; Said webpage is closed processing through calling the relevant API of Flash to said video equipment.
7. method according to claim 6 is characterized in that: the webpage delay function withdraws from the circular wait state after detecting camera success closed condition automatically, and carries out page close, realizes closing based on the webpage camera.
8. method according to claim 6; It is characterized in that: when source user is closed video equipment through webpage; The invoking web page function carries out delay process; The process of said video equipment closed condition being carried out cycle detection is: said source user is clicked and is closed camera or close the page and close camera when handling operation; Automatically the invoking web page function carries out delay process, said camera is closed success status carry out cycle detection, webpage is in waits for said camera success closed condition.
9. method according to claim 6; It is characterized in that: source user also comprises before closing video equipment through webpage: said source user is opened the our station webpage; Webpage loads the Flash plug-in unit; Said Flash plug-in unit calls local camera, and its process is: said source user is opened the our station webpage, and webpage loads the Flash plug-in unit automatically; Said Flash plug-in unit is opened local camera through calling the Camera.getCamera method, and the said camera object that will open this moment is put into the camera array variable; After said camera is opened; When Flash calls NetStream camera image stream is issued, when reception, recording operation, operated NetStream and NetConnection object put into NetStream and NetConnection array variable respectively.
10. method according to claim 8; It is characterized in that: said source user is clicked and is closed camera or close the page and close camera when handling operation; Automatically the invoking web page function carries out delay process; Said camera is closed success status carry out cycle detection, webpage is in waits for that the process of said camera success closed condition is: said source user is clicked and is closed camera or close the page and close camera when handling operation, and webpage calls JavaScript delay process function automatically; Add the state judgment mode through circulation or recurrence, let the page wait for the change of camera success closed condition always.
CN2011100599828A 2010-12-07 2011-03-14 Method for closing camera Active CN102314340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011100599828A CN102314340B (en) 2010-12-07 2011-03-14 Method for closing camera

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN2010105764418A CN102023860A (en) 2010-12-07 2010-12-07 Method for turning off camera on webpage
CN201010576441.8 2010-12-07
CN2011100599828A CN102314340B (en) 2010-12-07 2011-03-14 Method for closing camera

Publications (2)

Publication Number Publication Date
CN102314340A true CN102314340A (en) 2012-01-11
CN102314340B CN102314340B (en) 2013-12-11

Family

ID=43865182

Family Applications (2)

Application Number Title Priority Date Filing Date
CN2010105764418A Pending CN102023860A (en) 2010-12-07 2010-12-07 Method for turning off camera on webpage
CN2011100599828A Active CN102314340B (en) 2010-12-07 2011-03-14 Method for closing camera

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN2010105764418A Pending CN102023860A (en) 2010-12-07 2010-12-07 Method for turning off camera on webpage

Country Status (1)

Country Link
CN (2) CN102023860A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268350A (en) * 2018-01-31 2018-07-10 广东欧珀移动通信有限公司 Control method and related product
CN108363590A (en) * 2018-05-17 2018-08-03 珠海横琴盛达兆业科技投资有限公司 A kind of method of webpage version free switching computer camera

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9712733B2 (en) * 2009-08-17 2017-07-18 Jianhua Cao Method and apparatus for live capture image-live streaming camera
CN102170377A (en) * 2011-04-26 2011-08-31 苏州阔地网络科技有限公司 Method and system for realizing video equipment detection based on webpage
CN102185914A (en) * 2011-04-26 2011-09-14 苏州阔地网络科技有限公司 Webpage-based method and system for realizing video equipment closing
CN102789561B (en) * 2012-06-29 2015-11-25 北京奇虎科技有限公司 The using method of camera and device in a kind of browser
CN103914340A (en) * 2012-12-31 2014-07-09 联想(北京)有限公司 Information processing method and corresponding information processing device
CN103853846B (en) * 2014-03-25 2017-11-03 可牛网络技术(北京)有限公司 A kind of method and system for closing the page in a browser
CN112380957A (en) * 2020-11-10 2021-02-19 平安普惠企业管理有限公司 Method and device for identifying other item ticket information, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941520B1 (en) * 2000-05-09 2005-09-06 International Business Machines Corporation Method, system, and program for using a user interface program to generate a user interface for an application program
CN101470501A (en) * 2007-12-26 2009-07-01 珠海中慧微电子有限公司 Time-delay reset control circuit and method
CN101483537A (en) * 2009-02-12 2009-07-15 周佺喜 Method for real-time displaying website user status in webpage instant communication

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941520B1 (en) * 2000-05-09 2005-09-06 International Business Machines Corporation Method, system, and program for using a user interface program to generate a user interface for an application program
CN101470501A (en) * 2007-12-26 2009-07-01 珠海中慧微电子有限公司 Time-delay reset control circuit and method
CN101483537A (en) * 2009-02-12 2009-07-15 周佺喜 Method for real-time displaying website user status in webpage instant communication

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
余 亮等: "Flash 摄像头游戏课件设计与开发", 《现代教育技术》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268350A (en) * 2018-01-31 2018-07-10 广东欧珀移动通信有限公司 Control method and related product
CN108268350B (en) * 2018-01-31 2021-04-09 Oppo广东移动通信有限公司 Control method and related product
CN108363590A (en) * 2018-05-17 2018-08-03 珠海横琴盛达兆业科技投资有限公司 A kind of method of webpage version free switching computer camera

Also Published As

Publication number Publication date
CN102023860A (en) 2011-04-20
CN102314340B (en) 2013-12-11

Similar Documents

Publication Publication Date Title
CN102314340B (en) Method for closing camera
CN102811438B (en) Information interaction method, relevant device and system
CN110417766A (en) A kind of method and apparatus of protocol analysis
US11792865B2 (en) Device binding method and apparatus, and electronic device
CN204350029U (en) Data interaction system
CN104883384B (en) A kind of method and apparatus for the end ability that client is provided for light application
US20140258891A1 (en) Electronic device, storage medium and method for processing information
CN102364957A (en) Method, device and equipment for playing internet videos
CN107786432A (en) Information displaying method, device, computer installation and calculating readable storage medium storing program for executing
CN107679214A (en) Link localization method, device, terminal and computer-readable recording medium
WO2014110929A1 (en) Method, device, and system for uploading data
CN107018137A (en) A kind of Flash reorientation methods and device
CN109889468B (en) Network data transmission method, system, device, equipment and storage medium
CN110333919A (en) A kind of method and apparatus that social object information is presented
US20140082527A1 (en) Method and device for processing tabbed-page
CN104202432B (en) Remote web management system and management method
WO2017166640A1 (en) Application calling method and terminal
CN107193562A (en) A kind of image processing method and device
CN113766304B (en) Screen projection method and device, electronic equipment and storage medium
CN102185914A (en) Webpage-based method and system for realizing video equipment closing
CN109145827A (en) Video communication method and device
CN115103231A (en) Video call method and device, first electronic equipment and second electronic equipment
US20140201233A1 (en) Method, device, and system for uploading data
CN114268653B (en) Equipment calling method, device, equipment, medium and product
WO2024022397A1 (en) Network selection method and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 215121 Jiangsu Province, Suzhou City Industrial Park No. 666 Feng Ting Avenue Weiting Intelligent Industrial Park Building 8

Patentee after: Kuo Di education and science company limited

Address before: 215121 Jiangsu Province, Suzhou City Industrial Park No. 666 Feng Ting Avenue Weiting Intelligent Industrial Park Building 8

Patentee before: Suzhou Kuodi Network Technology Co., Ltd.

TR01 Transfer of patent right

Effective date of registration: 20201123

Address after: 226100 Guangzhou road Jiangsu city Nantong Province Haimen Economic and Technological Development Zone No. 999

Patentee after: Nantong Construction Engineering Co.,Ltd.

Address before: 215121 Jiangsu Province, Suzhou City Industrial Park No. 666 Feng Ting Avenue Weiting Intelligent Industrial Park Building 8

Patentee before: CODYY EDUCATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right