CN108388628A - The method and device that web-page audio plays - Google Patents
The method and device that web-page audio plays Download PDFInfo
- Publication number
- CN108388628A CN108388628A CN201810147447.XA CN201810147447A CN108388628A CN 108388628 A CN108388628 A CN 108388628A CN 201810147447 A CN201810147447 A CN 201810147447A CN 108388628 A CN108388628 A CN 108388628A
- Authority
- CN
- China
- Prior art keywords
- audio
- web
- page
- audio player
- webpage
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention discloses the method and devices that a kind of web-page audio plays, and belong to electronic technology field.The method includes:When receiving the play instruction to web-page audio, preset audio player is associated with browser kernel, the web-page audio refers to the audio provided by webpage;The web-page audio is played out based on the audio player;When receiving the operational order to the web-page audio, the web-page audio is operated accordingly in the audio player based on the browser kernel.Using the present invention, the flexibility that control web-page audio plays can be improved.
Description
Technical field
The present invention relates to electronic technology field, more particularly to a kind of method and device of web-page audio broadcasting.
Background technology
Audio can be added in webpage by webpage author in Web- Designing, and can call corresponding audio
Player module, to be supplied to the user of browsing webpage to listen to.
Audio can be music, recording, program of radio station etc., can be the audio that user is uploaded to server, can also be
Existing audio in server.The download address of audio in the server can be embedded in webpage.User beats in a browser
When opening the webpage or clicking the play options in webpage, play instruction can be triggered.Then, browser kernel can basis
Download address downloads audio from server, and corresponding audio player module is called to play the audio.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
Audio player module is used only for playing out audio, itself can not control audio.Webpage
Some control options (such as play options, pause option) may be arranged in producer in webpage, or even are not provided with control choosing
.User can only control the broadcasting of audio according to the control option in webpage in the audio in listening to webpage,
It cannot even be controlled in no control option, to cause the flexibility for controlling web-page audio broadcasting relatively low.
Invention content
In order to solve problems in the prior art, an embodiment of the present invention provides the methods and dress of a kind of broadcasting of web-page audio
It sets.The technical solution is as follows:
On the one hand, a kind of method that web-page audio plays is provided, the method includes:
When receiving the play instruction to web-page audio, preset audio player is closed with browser kernel
Connection, the web-page audio refers to the audio provided by webpage;
The web-page audio is played out based on the audio player;
When receiving the operational order to the web-page audio, based on the browser kernel in the audio player
In the web-page audio is operated accordingly.
On the one hand, a kind of device that web-page audio plays is provided, described device includes:
Relating module, for when receiving the play instruction to web-page audio, by preset audio player and browsing
Device kernel is associated, and the web-page audio refers to the audio provided by webpage;
Playing module plays out the web-page audio for being based on the audio player;
First operation module, for when receiving the operational order to the web-page audio, being based in the browser
Core operates the web-page audio in the audio player accordingly.
On the one hand, provide a kind of terminal, the terminal includes processor and memory, be stored in the memory to
A few instruction, described instruction are loaded by the processor and are executed the method to realize above-mentioned web-page audio broadcasting.
On the one hand, a kind of computer readable storage medium is provided, at least one instruction is stored in the storage medium,
Described instruction is loaded by processor and is executed the method to realize above-mentioned web-page audio broadcasting.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:
In the embodiment of the present invention, terminal is when receiving the play instruction to web-page audio, by preset audio player
It is associated with browser kernel, is then based on audio player and web-page audio is played out, when receiving to web-page audio
Operational order when, web-page audio is operated accordingly in audio player based on browser kernel.In this way, all nets
Page audio can be played out using a unified audio player, and user can be in the audio player to sound
Frequency is controlled, and is not only restricted to the function of webpage author's offer, it is thus possible to improve the flexible of control web-page audio broadcasting
Property.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is a kind of homepage schematic diagram of audio player provided in an embodiment of the present invention;
Fig. 2 is the method flow diagram that a kind of web-page audio provided in an embodiment of the present invention plays;
Fig. 3 is the interaction schematic diagram of a kind of audio player and browser kernel provided in an embodiment of the present invention;
Fig. 4 is a kind of audio player shortcut icon schematic diagram provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of display audio player plays notice provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram that a kind of webpage provided in an embodiment of the present invention plays record list;
Fig. 7 is the schematic device that a kind of web-page audio provided in an embodiment of the present invention plays;
Fig. 8 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
An embodiment of the present invention provides a kind of method that web-page audio plays, the executive agent of this method is terminal.Wherein,
The terminal can be smart mobile phone, tablet computer, laptop etc..
Terminal may include the components such as processor, memory, screen.Processor can be CPU (Central
Processing Unit, central processing unit) etc., it can be used for audio player and browser kernel being associated, to net
Page audio carries out the processing such as corresponding operation.Memory can be RAM (Random Access Memory, random access memory
Device), Flash (flash memory) etc. can be used for storing the data needed for the data received, processing procedure, be generated in processing procedure
Data etc., such as web-page audio, web-page audio broadcast state.Screen can be touch screen, be displayed for equipment row
Table, the control page can be also used for detection touching signal etc..Terminal can also be defeated including transceiver, image-detection component, audio
Go out component and audio input means etc..Transceiver can be used for carrying out data transmission with miscellaneous equipment, may include antenna,
With circuit, modem etc..Image-detection component can be camera etc..Audio output part can be speaker, earphone etc..
Audio input means can be microphone etc..
In addition to that there can be the content of word, picture in webpage, there can also be audio to be supplied to user to listen to, for example, net
It can be provided with background music in page, user can browse the webpage in background music, alternatively, introducing the webpage of program of radio station
Can be provided with the audio of corresponding program of radio station, user can listen to the program of radio station when browsing the webpage, webpage it is interior
Hold very abundant.Corresponding audio player module can be configured with for the webpage with audio, in webpage to play the audio.
But user can not directly control the audio player module, only webpage author is provided with corresponding control in webpage and selects
, user could control the audio in webpage, and be only able to use the control function of webpage author's offer, than
It is such as merely capable of playing or suspending audio, is unable to F.F., rewind or playback audio.
A kind of audio player is present embodiments provided, for being played out to the audio in webpage.The audio player
In unified option of operation can be provided, and control function as comprehensive as possible can be provided.Specifically, the audio player
Homepage schematic diagram can with as shown in Figure 1, can include in the homepage play control option, webpage play record list
Option, play mode option, the off option, source page redirect option, in addition, can also be shown in homepage audio it is total when
Length, album cover, the lyrics, currently playing progress, playback rate etc., are not construed as limiting herein.
The method that web-page audio provided in this embodiment plays, as shown in the method flow diagram of Fig. 2, the processing stream of this method
Journey can be as follows:
201, when receiving the play instruction to web-page audio, preset audio player and browser kernel are carried out
Association.
Wherein, web-page audio refers to the audio provided by webpage, when user by browser terminal open webpage when, can
To be downloaded from server by browser.In force, it when user is in using terminal browsing webpage, clicks in webpage
Play options, the play instruction to web-page audio can be triggered.Alternatively, user need not click any when point opens webpage
Option, so that it may to trigger play instruction, to play the audio in webpage (such as background music).For triggering the item of play instruction
Part, it is the play instruction triggered in webpage to require nothing more than, and other forms are not construed as limiting herein.
Above-mentioned audio player is installed in advance in terminal.When receiving the broadcasting to web-page audio triggered in webpage
When instruction, terminal can call above-mentioned audio player.In order to ensure the broadcasting shape when playing web-page audio, shown in webpage
State is consistent with audio player, terminal when calling audio player, can by audio player and browser kernel into
Row association, to play out the interaction of status information.
Optionally, the specific processing of step 201 can be as follows:Preset audio is broadcast based on the wrapper of browser kernel
It puts device to be packaged, so that browser kernel calls the audio player.
In force, terminal can be arranged one in current net while establishing audio player for audio player
Corresponding kernel listener (monitoring) object of page, then, the browser kernel of terminal can call wrapper difference internal
Audio player module, webpage in core listener objects and audio player play record list, homepage etc. and are packaged
Audio player object is obtained, then audio player object is packaged again, to facilitate browser kernel to carry out it
Management.The interaction schematic diagram of audio player and browser kernel as shown in Figure 3, above-mentioned kernel listener objects can be used
In the information exchange of the playing control module of the playing control module and browser kernel of audio player, specifically, can be
Playing control module for audio player sends broadcast state information to the playing control module of browser kernel.
It optionally, can also be in webpage after preset audio player and browser kernel are associated by terminal
The shortcut icon of audio player is shown on designated position;When receiving homepage idsplay order, audio player is shown
Homepage.Wherein, homepage idsplay order is triggered by the operation on the shortcut icon of audio player.Terminal is in never call sound
When frequency player, the shortcut icon of audio player can not be shown.When receiving play instruction, terminal calls audio to play
The shortcut icon can be shown while device on webpage, so that user carries out subsequent operation to audio player.
In force, audio player shortcut icon schematic diagram as shown in Figure 4, terminal can be in the designated positions of webpage
The upper shortcut icon for showing the audio player, which can be round icon, and can show current broadcasting
Progress ratio, the pattern of shortcut icon can be the thumbnails of album cover, can be with dynamic rotary in the state of playing audio.
For the specific form of audio player shortcut icon, a kind of form shown in the present embodiment as just a kind of example, also,
Shortcut icon position can change depending on the user's operation, be not construed as limiting herein.In order to ensure in webpage refreshing, close, preceding
Into or audio remains able to continue to play when retreating, the shortcut icon of the audio player can be shown in the form of suspended window
, in webpage refreshing, closing, forward or backward, do not turn off audio player.In addition, when terminal calls audio player,
Can also show corresponding broadcasting notice in status bar, the schematic diagram of display audio player plays notice as shown in figure 5, this
Place is not construed as limiting.
When user clicks the shortcut icon of audio player, the homepage idsplay order to audio player can be triggered.
Then, terminal can show the homepage of audio player, which can be as shown in Figure 1.
202, web-page audio is played out based on audio player.
In force, as shown in figure 3, may include in audio player audio player module, play history management module,
Close management module, recurrent state management module, the lyrics/cover management module, playing control module, history web pages address administration
Module etc..After triggering play instruction in the above process, the browser of terminal can be according to the download address of web-page audio, from service
The web-page audio is downloaded in device.Then, the audio stream data of the web-page audio can be sent to audio broadcasting by browser kernel
Device calls audio player to be played out to web-page audio in the audio player module of audio player by wrapper.
Optionally, during playing web-page audio, audio player shows broadcast state with synchronizing web pages, accordingly
Processing can be as follows:The current play status of web-page audio is shown in audio player;If webpage has display, audio is broadcast
The function of state is put, then corresponding broadcast state is shown in webpage according to the current play status of web-page audio.
In force, during playing web-page audio, audio player can get audio player module therein
Actual play state, show the current play status of web-page audio in homepage or shortcut icon, for example, it is currently playing into
Degree, broadcasting/halted state, play mode (such as single cycle, list cycle), playback rate etc..And for webpage, if net
Page producer is not provided with the page or component of corresponding display broadcast state, and webpage does not have the function of display broadcast state,
Any broadcast state of web-page audio will not then be shown;If the page or component provided with corresponding display broadcast state,
Webpage has the function of display broadcast state, then browser kernel can pass through packaging when being associated with audio player
Layer obtains the audio player module actual play state in audio player, and then corresponding broadcasting shape can be shown in webpage
State.
203, when receiving the operational order to web-page audio, based on browser kernel to webpage in audio player
Audio is operated accordingly.
In force, when showing the main interface of audio player in terminal, user can be in the homepage of audio player
Face is operated, alternatively, user can also operate on the control option in webpage, triggering refers to the operation of web-page audio
It enables.Then, terminal can call audio player by browser kernel, be operated accordingly to web-page audio.
Specifically processing can be as follows for step 203:When receiving the operational order to web-page audio, according to operational order
The wrapper for calling browser kernel, it is corresponding that the wrapper based on browser kernel calls audio player to carry out web-page audio
Operation.
In force, when receiving the operational order to web-page audio, the browser kernel of terminal can be according to the behaviour
Make instruction and carries out corresponding logical process to call its wrapper, in turn, after wrapper can call encapsulation according to operational order
Audio player object, then call audio player object the corresponding interface carry out respective handling.For example, when receive pair
When the pause instruction of web-page audio, the wrapper of browser can call the audio player object after encapsulation, then call sound
The audio player module interface of frequency player object framework suspends the broadcasting of audio player module.Due to the broadcasting shape in webpage
The display of state is managed by browser kernel, and the broadcast state of audio player is according to audio player module therein
Actual play status display, then when audio player is associated with browser kernel, no matter user is gone back on audio player
It is the operational order triggered in webpage, all calls audio player to grasp web-page audio accordingly via browser kernel
Make, the broadcast state that the actual play state three of audio player, webpage and web-page audio may be implemented is consistent.
It describes in detail below to two kinds of situations of trigger action instruction:
The first situation, when receiving the first operational order, based on browser kernel in audio player to webpage
Audio is operated accordingly.
Wherein, the first operational order is by triggering the operation for playing control option on webpage.In force, user can point
The option of operation in touching webpage is hit or slided, the first operational order to web-page audio is triggered, for example, what triggering pause played
Operational order, to suspend the broadcasting of web-page audio.Then, the browser kernel of terminal can call audio to play by wrapper
Device is operated accordingly, such as pause processing.Meanwhile the browser kernel of terminal can be based on the first operational order and manage net
The broadcast state in webpage is shown as by the display of broadcast state for example, when receiving the operational order that pause plays in page
Halted state.While audio player is operated accordingly, corresponding broadcast state can be shown.
The second situation, when receiving the second operational order, the second operational order is sent to browser kernel, based on clear
Device kernel of looking at operates web-page audio in audio player accordingly.
Wherein, the second operational order is by triggering the operation of option of operation on audio player.In force, it is shown in terminal
Be shown with audio player main interface or audio player option of operation when, user can be in the option of operation of audio player
On click or slide, trigger to the second operational order of web-page audio.For example, the option of operation can be in Fig. 1
Play control option, it is corresponding with the playing control module in Fig. 3, by broadcasting control option may be implemented to web-page audio into
Row play, pause, dragging fast forwarding and fast rewinding, fast forwarding and fast rewinding 15s, it is upper one head next etc. operations, option of operation can also be audio
Other options in player, are not construed as limiting herein.
Audio player will not pull up a horse and be operated accordingly to itself when receiving second operational order, and
It is that second operational order is sent to browser kernel by kernel listener objects.Then, browser kernel can lead to
Crossing wrapper calls audio player to be operated accordingly.Meanwhile the browser kernel of terminal can be based on the second operation and refer to
The display for enabling broadcast state in administration web page while audio player is operated accordingly, can show corresponding broadcasting
State.
The function of option of operation different in audio player is introduced below:
For webpage play record list option, when terminal when receive webpage play record list display instruction when, show
Show that the webpage pre-established plays record list.
Wherein, webpage plays source net of the record list for web-page audio and web-page audio that log history played
Page address, webpage play the instruction of record list display and are touched by the operation for playing record list option to webpage on audio player
Hair.The source page of web-page audio is user when listening to the web-page audio, the webpage with audio player opening relationships is built
Found the webpage of corresponding kernel listener objects.
In force, it can be provided with webpage in audio player and play record list option, as webpage plays note in Fig. 1
List option is recorded, it is corresponding with the play history management module in Fig. 3.User can click in the main interface of audio player
Webpage plays record list option, and triggering webpage plays record list display instruction.Then, terminal, which can be shown, pre-establishes
Webpage plays record list, and the schematic diagram that webpage plays record list is as shown in Figure 6.Webpage plays can preserve in record list
There are the audio that user listens in historical period and corresponding web page address, you can be that user is played for the first time using the audio
All broadcastings record after device can also be that the nearest preset number item of listening period plays record, be not construed as limiting herein.Eventually
The audio player at end, can be by the web-page audio with the webpage of corresponding source page after playing a web-page audio
Location is added to webpage and plays in record list.
Optionally, when terminal receives Audio conversion instruction, disconnection audio player is associated with browser kernel, and
The broadcasting for suspending web-page audio, records the broadcast state of web-page audio;When receiving continue-to-play instruction, audio is broadcast again
It puts device to be associated with browser kernel, according to the broadcast state of the web-page audio of record, continues to play based on audio player
Web-page audio.
Wherein, Audio conversion instruction is triggered by the operation in audio player, and continue-to-play instruction on webpage by broadcasting
Put the operation triggering of control option.In force, any broadcasting that user can be played in record list with webpage clicking records, and touches
Pronounce frequency switching command, to listen back to corresponding web-page audio.At this point, terminal can disconnect audio player and browser kernel
When avoiding the audio in the web-page audio and current web page after generation switching inconsistent, switching is but shown in current web page for association
The mistake of the broadcast state of audio afterwards.Meanwhile the browser kernel of terminal can also suspend the broadcasting of current web page audio, and
Record the broadcast state of current web page audio.The download of web-page audio in the server can also be preserved in audio player
Location, when audio player and browser kernel are after being associated with disconnection, audio player can according to the download address of web-page audio,
Web-page audio is downloaded from server to play out, without interacting by browser and server.
After this, if user clicks play options in current web page, triggering continues to play to web-page audio
Instruction, then audio player and browser kernel are associated by terminal again, and association process is same as described above or similar
Seemingly, details are not described herein again.Then, browser kernel can call audio to play according to the broadcast state of the web-page audio of record
Device continues to play web-page audio.For example, broadcast state may include playing progress rate and playback rate, play mode etc., audio is broadcast
Putting device can be according to the broadcast state recorded when suspending web-page audio, from playing progress rate when pause, with former playback rate and original
Play mode continues to play web-page audio.When audio player and browser kernel be associated with re-establish after, can be by clear
Device of looking at is interacted with server, downloads web-page audio.
Option is redirected for source page, if terminal receives the source page jump instruction to any web-page audio
When, the source page address of any web-page audio is sent to browser kernel, jumps to any web-page audio in a browser
Source page shows the source page of any web-page audio.
It is triggered in, source page jump instruction by the operation for redirecting option to source page on audio player.In reality
Source page can be redirected the corresponding web page address setting of option by Shi Zhong, terminal during playing any web-page audio
For the web page address of the corresponding source page of the web-page audio.It can be the source page choosing in Fig. 1 that source page, which redirects option,
, it is corresponding with the history web pages address management module in Fig. 3.User can click source in the homepage of audio player
Webpage redirects option, triggers source page jump instruction.Then, the correspondence webpage that terminal can will be stored in audio player
Address is sent to browser kernel by kernel listener objects, and then browser kernel can jump the page of browser
The corresponding webpage of web-page audio is gone to, shows that the webpage browses the webpage again to provide user.
In addition, the operation that user during browsing current web page, may be moved forward or back so that current net
Page switches to running background, and corresponding processing can be as follows at this time:When webpage switches to running background, web displaying is recorded
Broadcast state;When webpage switches to foreground display, if the current play status of the broadcast state of record and web-page audio is not
Unanimously, then corresponding broadcast state is shown in webpage according to the current play status of web-page audio.
In force, when webpage is in running background, browser kernel need not control the display of the webpage.This
When, audio player will not stop playing web-page audio.The browser kernel of terminal can be listener pairs by corresponding kernel
As being set to suspend (pause) state, and the broadcast state in webpage when switching to backstage is recorded.If user is in sound
It is operated in frequency player, triggers corresponding operational order, then corresponding operational order can be adjusted back and be arrived by audio player
Kernel listener objects.Then browser kernel can call audio to play according to corresponding operational order by wrapper
Device is operated accordingly, and corresponding operation note is got off.
If webpage is switched to foreground and shows, the browser kernel of terminal can eliminate the corresponding kernel of the webpage
The suspend states of listener objects.And according to current web page in running background, browser kernel record to webpage
The operation of audio determines the current broadcast state of web-page audio, then, after browser kernel can be switched to according to current web page
The broadcast state recorded when platform judges whether the broadcast state of record is identical as the broadcast state that web-page audio is current.For example, such as
Web-page audio when fruit webpage is switched to backstage is state being played on, and webpage user during running background suspends
The broadcasting of web-page audio, then when webpage is switched to foreground display, broadcast state and the web-page audio current broadcasting of record
State differs, and state being played on may be shown in webpage, and the display in webpage can be adjusted to suspend by terminal
The state of broadcasting.
Optionally, when webpage refreshes or closes, terminal can disconnect being associated with for audio player and browser kernel.This
When, terminal can empty the corresponding kernel listener objects of the webpage.Audio player can not be refreshed or closed by webpage
Influence, continue play web-page audio be not construed as limiting herein alternatively, can also suspend or stop the broadcasting of web-page audio.
The case where continuing to play web-page audio for audio player:Terminal is based on audio player and appoints from server download
One web-page audio;When the option of operation for receiving audio player trigger to the operational order of any web-page audio when, be based on
Audio player operates any web-page audio accordingly.
In force, audio player will continue to play web-page audio, when needing to be downloaded any web-page audio,
Audio player can be downloaded according to the download address of web-page audio from server, and no longer need to carry out by browser
It downloads and transmits.
If user carries out any operation not in webpage, but is operated in audio player, to trigger phase
The operational order answered, then audio player directly web-page audio can be operated accordingly according to the operational order, without
It is called by browser kernel.Since audio player is associated with browser kernel disconnection, in the case where webpage refreshes,
The variation of web-page audio broadcast state does not interfere with the display in webpage.
The case where suspending for audio player or stopping playing webpage music:When webpage refreshes or closes, it can trigger
Pause instruction or halt instruction, and then audio player can suspend or stop the broadcasting of web-page audio.If user need after
Web-page audio is put in continued broadcasting, then play options can be clicked in audio player, triggers the play instruction to the web-page audio.So
Afterwards, audio player can be downloaded according to the download address of the web-page audio from server, and be broadcast based on audio therein
Component is put to play out.
In addition, if the play instruction to web-page audio that user triggers in webpage again, then terminal can be built again
Vertical audio player is associated with browser kernel, and the process based on above-mentioned introduction completes each function.
Close pattern there are two types of being arranged for the off option, in the homepage of audio player:Close pattern immediately
With timing close pattern, to two kinds of close patterns, processing can be as follows accordingly:When receiving out code immediately, to browsing
Device kernel sends out code immediately, to web-page audio stop the behaviour of broadcasting in audio player based on browser kernel
Make;Or, when receiving timing out code, to browser kernel transmission timing out code, when reaching preset closing
Between when, based on browser kernel in audio player to web-page audio carry out stop broadcasting operation.
Wherein, out code immediately can be by triggering the operation of the off option on audio player, timing out code
It can also be by being triggered to the operation of the off option on audio player.In force, when webpage advances, retreats, refreshes or closes,
Terminal does not all turn off audio player.It is operated on the off option only as user in audio player, triggers phase
When the out code answered, terminal just closes audio player according to preset close pattern.The off option can be such as the pass in Fig. 1
Option is closed, it is corresponding with the closing management module in Fig. 3.Above two close pattern can be corresponding with different options, also may be used
With option having the same, above-mentioned option belongs to the off option, is not construed as limiting herein.
For the pattern closed immediately, user can click the option closed immediately, trigger out code immediately.If this
When audio player be associated with browser kernel, then audio player can be by kernel listener objects to browser kernel
Out code immediately is sent, then browser kernel can call audio player to stop broadcasting for web-page audio by wrapper
It puts, and closes audio player.Meanwhile the broadcast state shown in webpage can also be adjusted to stop playing by browser kernel
State.If audio player is not associated with browser kernel at this time, terminal can directly stop in audio player
The broadcasting of web-page audio, and audio player is closed, it is not construed as limiting herein.
For the pattern that timing is closed, user can click the option that timing is closed, and trigger timing out code.When closing
Between can be configured by user, can also be the waiting time given tacit consent in audio player.If audio player at this time
It is associated with browser kernel, then audio player can be closed by kernel listener objects to browser kernel transmission timing
Instruction, the timing out code carry the above-mentioned shut-in time, and when reaching the shut-in time, browser kernel can pass through wrapper
It calls audio player to stop the broadcasting of web-page audio, and closes audio player.Equally, browser kernel can also be by webpage
The broadcast state of middle display is adjusted to the state for stopping playing.If audio player is not associated with browser kernel at this time,
Terminal can stop the broadcasting of web-page audio when reaching the shut-in time directly in audio player, and close audio broadcasting
Device is not construed as limiting herein.
In the embodiment of the present invention, terminal is when receiving the play instruction to web-page audio, by preset audio player
It is associated with browser kernel, is then based on audio player and web-page audio is played out, when receiving to web-page audio
Operational order when, web-page audio is operated accordingly in audio player based on browser kernel.In this way, all nets
Page audio can be played out using a unified audio player, and user can be in the audio player to sound
Frequency is controlled, and is not only restricted to the function of webpage author's offer, it is thus possible to improve the flexible of control web-page audio broadcasting
Property.
Based on the same technical idea, the embodiment of the present invention additionally provides a kind of device that web-page audio plays, the device
It can be the terminal in above-described embodiment.The schematic device that web-page audio as shown in Figure 7 plays, the device include:
Relating module 701, for when receiving the play instruction to web-page audio, by preset audio player with it is clear
Device kernel of looking at is associated, and the web-page audio refers to the audio provided by webpage;
Playing module 702 plays out the web-page audio for being based on the audio player;
First operation module 703, for when receiving the operational order to the web-page audio, being based on the browser
Kernel operates the web-page audio in the audio player accordingly.
Optionally, the relating module 701 is used for:
Preset audio player is packaged based on the wrapper of browser kernel, so as to the browser kernel tune
With the audio player;
First operation module 703 is used for:
When receiving the operational order to the web-page audio, the browser kernel is called according to the operational order
Wrapper, it is corresponding that wrapper based on the browser kernel calls the audio player to carry out the web-page audio
Operation.
Optionally, first operation module 703 is used for:
When receiving the first operational order, based on the browser kernel to the webpage in the audio player
Audio is operated accordingly, and first operational order is by triggering the operation for playing control option on the webpage;Or
When receiving the second operational order, second operational order is sent to the browser kernel, based on described
Browser kernel operates the web-page audio in the audio player accordingly, and second operational order is by right
The operation triggering of option of operation on the audio player.
Optionally, the option of operation of the audio player includes at least one or more of:Play control option, net
Page plays record list option, play mode option, the off option, source page and redirects option.
Optionally, described device further includes:
List display module 704, for when receiving webpage and playing record list display instruction, showing and pre-establishing
Webpage plays record list, and the webpage plays record list and is used for the web-page audio and the webpage that log history played
The source page address of audio, the webpage play the instruction of record list display by playing note to webpage on the audio player
Record the operation triggering of list option.
Optionally, described device further includes:
Jump module 705, if when for receiving the source page jump instruction to any web-page audio, to described clear
Device kernel of looking at sends the source page address of any web-page audio, jumps to any web-page audio in a browser
Source page shows the source page of any web-page audio, and the source page jump instruction is by playing the audio
Source page redirects the operation triggering of option on device.
Optionally, first operation module 703 is used for:
When receiving out code immediately, to out code immediately described in browser kernel transmission, based on described
Browser kernel to the web-page audio stop the operation of broadcasting, the out code immediately in the audio player
By being triggered to the operation of the off option on the audio player;Or,
When receiving timing out code, the timing out code is sent to the browser kernel, it is pre- reaching
If shut-in time when, stopping broadcasting being carried out to the web-page audio in the audio player based on the browser kernel
Operation, the timing out code by the audio player the off option operation trigger.
Optionally, described device further includes:
Handover module 706, for when receiving Audio conversion instruction, disconnecting the audio player and the browser
The association of kernel, and suspend the broadcasting of the web-page audio, the broadcast state of the web-page audio is recorded, the Audio conversion refers to
It enables and being triggered by the operation in the audio player;
Continue playing module 707, for when receiving continue-to-play instruction, again by the audio player with it is described
Browser kernel is associated, according to the broadcast state of the web-page audio of record, based on the audio player after continued broadcasting
The web-page audio is put, the continue-to-play instruction is triggered by the operation for playing control option on the webpage.
Optionally, described device further includes:
First state display module 708, for showing the currently playing of the web-page audio in the audio player
State;
Second state display module 709, if having the function of display audio broadcast state, basis for the webpage
The current play status of the web-page audio shows corresponding broadcast state in the webpage.
Optionally, described device further includes:
Logging modle 710, for when the webpage switches to running background, recording the broadcasting shape of the web displaying
State;
Third state display module 711, for when the webpage switch to foreground display when, if record broadcast state
It is inconsistent with the current play status of the web-page audio, then according to the current play status of the web-page audio in the webpage
The middle corresponding broadcast state of display.
Optionally, described device further includes:
Disconnect relating module 712, for when the webpage refresh or close when, disconnect the audio player with it is described clear
Look at the association of device kernel.
Optionally, described device further includes:
Download module 713, for downloading any web-page audio from server based on the audio player;
Second operation module 714, for when the option of operation triggering for receiving the audio player is to described any
When the operational order of web-page audio, any web-page audio is operated accordingly based on the audio player.
Optionally, described device further includes:
Shortcut icon display module 715, for showing the fast of the audio player on the designated position of the webpage
Prompt icon;
Homepage display module 716, for when receiving homepage idsplay order, showing the master of the audio player
The page, the homepage include the option of operation of the audio player, and the homepage idsplay order is by the audio
Operation triggering on the shortcut icon of player.
In the embodiment of the present invention, terminal is when receiving the play instruction to web-page audio, by preset audio player
It is associated with browser kernel, is then based on audio player and web-page audio is played out, when receiving to web-page audio
Operational order when, web-page audio is operated accordingly in audio player based on browser kernel.In this way, all nets
Page audio can be played out using a unified audio player, and user can be in the audio player to sound
Frequency is controlled, and is not only restricted to the function of webpage author's offer, it is thus possible to improve the flexible of control web-page audio broadcasting
Property.
It should be noted that:Above-described embodiment provide web-page audio play device when playing web-page audio, only with
The division progress of above-mentioned each function module, can be as needed and by above-mentioned function distribution by not for example, in practical application
Same function module is completed, i.e., the internal structure of terminal is divided into different function modules, to complete whole described above
Or partial function.In addition, the web-page audio that above-described embodiment the provides device played and the method that web-page audio plays are implemented
Example belongs to same design, and specific implementation process refers to embodiment of the method, and which is not described herein again.
Fig. 8 shows the structure diagram for the terminal 800 that an illustrative embodiment of the invention provides.The terminal 800 can be with
It is:Smart mobile phone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III,
Dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer
IV, dynamic image expert's compression standard audio level 4) player, laptop or desktop computer.Terminal 800 be also possible to by
Referred to as other titles such as user equipment, portable terminal, laptop terminal, terminal console.
In general, terminal 800 includes:Processor 801 and memory 802.
Processor 801 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place
DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- may be used in reason device 801
Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed
Logic array) at least one of example, in hardware realize.Processor 801 can also include primary processor and coprocessor, master
Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing
Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.
In some embodiments, processor 801 can be integrated with GPU (Graphics Processing Unit, image processor),
GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 801 can also wrap
AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processors are for handling related machine learning
Calculating operation.
Memory 802 may include one or more computer readable storage mediums, which can
To be non-transient.Memory 802 may also include high-speed random access memory and nonvolatile memory, such as one
Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 802 can
Storage medium is read for storing at least one instruction, at least one instruction is for performed to realize this Shen by processor 801
Please in embodiment of the method provide web-page audio play method.
In some embodiments, terminal 800 is also optional includes:Peripheral device interface 803 and at least one peripheral equipment.
It can be connected by bus or signal wire between processor 801, memory 802 and peripheral device interface 803.Each peripheral equipment
It can be connected with peripheral device interface 803 by bus, signal wire or circuit board.Specifically, peripheral equipment includes:Radio circuit
804, at least one of touch display screen 805, camera 806, voicefrequency circuit 807, positioning component 808 and power supply 809.
Peripheral device interface 803 can be used for I/O (Input/Output, input/output) is relevant at least one outer
Peripheral equipment is connected to processor 801 and memory 802.In some embodiments, processor 801, memory 802 and peripheral equipment
Interface 803 is integrated on same chip or circuit board;In some other embodiments, processor 801, memory 802 and outer
Any one or two in peripheral equipment interface 803 can realize on individual chip or circuit board, the present embodiment to this not
It is limited.
Radio circuit 804 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates
Frequency circuit 804 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 804 turns electric signal
It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 804 wraps
It includes:Antenna system, RF transceivers, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip
Group, user identity module card etc..Radio circuit 804 can be carried out by least one wireless communication protocol with other terminals
Communication.The wireless communication protocol includes but not limited to:Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 5G), wireless office
Domain net and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio circuit 804 may be used also
To include the related circuits of NFC (Near Field Communication, wireless near field communication), the application is not subject to this
It limits.
Display screen 805 is for showing UI (User Interface, user interface).The UI may include figure, text, figure
Mark, video and its their arbitrary combination.When display screen 805 is touch display screen, display screen 805 also there is acquisition to show
The ability of the surface of screen 805 or the touch signal of surface.The touch signal can be used as control signal to be input to processor
801 are handled.At this point, display screen 805 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or
Soft keyboard.In some embodiments, display screen 805 can be one, and the front panel of terminal 800 is arranged;In other embodiments
In, display screen 805 can be at least two, be separately positioned on the different surfaces of terminal 800 or in foldover design;In still other reality
Apply in example, display screen 805 can be flexible display screen, be arranged on the curved surface of terminal 800 or fold plane on.Even, it shows
Display screen 805 can also be arranged to non-rectangle irregular figure, namely abnormity screen.LCD (Liquid may be used in display screen 805
Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode)
Etc. materials prepare.
CCD camera assembly 806 is for acquiring image or video.Optionally, CCD camera assembly 806 include front camera and
Rear camera.In general, the front panel in terminal is arranged in front camera, rear camera is arranged at the back side of terminal.One
In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively
Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle
Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting functions or other fusions are clapped
Camera shooting function.In some embodiments, CCD camera assembly 806 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp,
It can also be double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, be can be used for not
With the light compensation under colour temperature.
Voicefrequency circuit 807 may include microphone and loud speaker.Microphone is used to acquire the sound wave of user and environment, and will
Sound wave, which is converted to electric signal and is input to processor 801, to be handled, or is input to radio circuit 804 to realize voice communication.
For stereo acquisition or the purpose of noise reduction, microphone can be multiple, be separately positioned on the different parts of terminal 800.Mike
Wind can also be array microphone or omnidirectional's acquisition type microphone.Loud speaker is then used to that processor 801 or radio circuit will to be come from
804 electric signal is converted to sound wave.Loud speaker can be traditional wafer speaker, can also be piezoelectric ceramic loudspeaker.When
When loud speaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications
Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 807 can also include
Earphone jack.
Positioning component 808 is used for the current geographic position of positioning terminal 800, to realize navigation or LBS (Location
Based Service, location based service).Positioning component 808 can be the GPS (Global based on the U.S.
Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union
The positioning component of Galileo system.
Power supply 809 is used to be powered for the various components in terminal 800.Power supply 809 can be alternating current, direct current,
Disposable battery or rechargeable battery.When power supply 809 includes rechargeable battery, which can support wired charging
Or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 800 further include there are one or multiple sensors 810.The one or more sensors
810 include but not limited to:Acceleration transducer 811, gyro sensor 812, pressure sensor 813, fingerprint sensor 814,
Optical sensor 815 and proximity sensor 816.
The acceleration that acceleration transducer 811 can detect in three reference axis of the coordinate system established with terminal 800 is big
It is small.For example, acceleration transducer 811 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 801 can
With the acceleration of gravity signal acquired according to acceleration transducer 811, control touch display screen 805 is regarded with transverse views or longitudinal direction
Figure carries out the display of user interface.Acceleration transducer 811 can be also used for game or the acquisition of the exercise data of user.
Gyro sensor 812 can be with the body direction of detection terminal 800 and rotational angle, and gyro sensor 812 can
To cooperate with acquisition user to act the 3D of terminal 800 with acceleration transducer 811.Processor 801 is according to gyro sensor 812
Following function may be implemented in the data of acquisition:When action induction (for example changing UI according to the tilt operation of user), shooting
Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 805 in terminal 800 can be arranged in pressure sensor 813.Work as pressure
The gripping signal that user can be detected in the side frame of terminal 800 to terminal 800 is arranged in sensor 813, by processor 801
Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 813 acquires.When the setting of pressure sensor 813 exists
When the lower layer of touch display screen 805, the pressure operation of touch display screen 805 is realized to UI circle according to user by processor 801
Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu
At least one of control.
Fingerprint sensor 814 is used to acquire the fingerprint of user, collected according to fingerprint sensor 814 by processor 801
The identity of fingerprint recognition user, alternatively, by fingerprint sensor 814 according to the identity of collected fingerprint recognition user.It is identifying
When the identity for going out user is trusted identity, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 801
Include solution lock screen, check encryption information, download software, payment and change setting etc..Terminal can be set in fingerprint sensor 814
800 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 800, fingerprint sensor 814 can be with
It is integrated with physical button or manufacturer Logo.
Optical sensor 815 is for acquiring ambient light intensity.In one embodiment, processor 801 can be according to optics
The ambient light intensity that sensor 815 acquires controls the display brightness of touch display screen 805.Specifically, when ambient light intensity is higher
When, the display brightness of touch display screen 805 is turned up;When ambient light intensity is relatively low, the display for turning down touch display screen 805 is bright
Degree.In another embodiment, the ambient light intensity that processor 801 can also be acquired according to optical sensor 815, dynamic adjust
The acquisition parameters of CCD camera assembly 806.
Proximity sensor 816, also referred to as range sensor are generally arranged at the front panel of terminal 800.Proximity sensor 816
The distance between front for acquiring user and terminal 800.In one embodiment, when proximity sensor 816 detects use
When family and the distance between the front of terminal 800 taper into, touch display screen 805 is controlled from bright screen state by processor 801
It is switched to breath screen state;When proximity sensor 816 detects user and the distance between the front of terminal 800 becomes larger,
Touch display screen 805 is controlled by processor 801 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 800 of structure shown in Fig. 8, can wrap
It includes than illustrating more or fewer components, either combine certain components or is arranged using different components.
Based on the same technical idea, the embodiment of the present invention additionally provides a kind of non-transitory computer-readable storage medium
Matter, when the instruction in the storage medium is executed by the processor of terminal so that terminal is able to carry out:
When receiving the play instruction to web-page audio, preset audio player is closed with browser kernel
Connection, the web-page audio refers to the audio provided by webpage;
The web-page audio is played out based on the audio player;
When receiving the operational order to the web-page audio, based on the browser kernel in the audio player
In the web-page audio is operated accordingly.
Optionally, described to be associated preset audio player with browser kernel, including:
Preset audio player is packaged based on the wrapper of browser kernel, so as to the browser kernel tune
With the audio player;
It is described when receiving the operational order to the web-page audio, broadcast in the audio based on the browser kernel
It puts in device and the web-page audio is operated accordingly, including:
When receiving the operational order to the web-page audio, call the wrapper of the browser kernel by the behaviour
Make instruction and be converted to the instruction format that the audio player is supported, the wrapper based on the browser kernel calls the sound
Frequency player operates the web-page audio accordingly.
Optionally, described when receiving the operational order to the web-page audio, based on the browser kernel in institute
It states in audio player and the web-page audio is operated accordingly, including:
When receiving the first operational order, based on the browser kernel to the webpage in the audio player
Audio is operated accordingly, and first operational order is by triggering the operation for playing control option on the webpage;Or
When receiving the second operational order, second operational order is sent to the browser kernel, based on described
Browser kernel operates the web-page audio in the audio player accordingly, and second operational order is by right
The operation triggering of option of operation on the audio player.
Optionally, the option of operation of the audio player includes at least one or more of:Play control option, net
Page plays record list option, play mode option, the off option, source page and redirects option.
Optionally, it is described the web-page audio is played out based on the audio player after, the method is also wrapped
It includes:
When receiving webpage broadcasting record list display instruction, show that the webpage pre-established plays record list, institute
It states webpage and plays source page address of the record list for web-page audio and the web-page audio that log history played,
The webpage plays the instruction of record list display and is touched by the operation for playing record list option to webpage on the audio player
Hair.
Optionally, it is described the web-page audio is played out based on the audio player after, the method is also wrapped
It includes:
If receive the source page jump instruction to any web-page audio, described in browser kernel transmission
The source page address of any web-page audio jumps to the source page of any web-page audio in a browser, shows institute
The source page of any web-page audio is stated, the source page jump instruction is by redirecting source page on the audio player
The operation of option triggers.
Optionally, described when receiving the second operational order, it sends second operation to the browser kernel and refers to
It enables, the web-page audio is operated accordingly in the audio player based on the browser kernel, described second
Operational order by the audio player option of operation operation trigger, including:
When receiving out code immediately, to out code immediately described in browser kernel transmission, based on described
Browser kernel to the web-page audio stop the operation of broadcasting, the out code immediately in the audio player
By being triggered to the operation of the off option on the audio player;Or,
When receiving timing out code, the timing out code is sent to the browser kernel, it is pre- reaching
If shut-in time when, stopping broadcasting being carried out to the web-page audio in the audio player based on the browser kernel
Operation, the timing out code by the audio player the off option operation trigger.
Optionally, it is described the web-page audio is played out based on the audio player after, the method is also wrapped
It includes:
When receiving Audio conversion instruction, being associated with for the audio player and the browser kernel is disconnected, and temporary
The broadcasting for stopping the web-page audio records the broadcast state of the web-page audio, and the Audio conversion instruction is by the audio
Operation triggering in player;
When receiving continue-to-play instruction, the audio player and the browser kernel are associated again,
According to the broadcast state of the web-page audio of record, continue to play the web-page audio based on the audio player, it is described
Continue-to-play instruction is triggered by the operation for playing control option on the webpage.
Optionally, it is described the web-page audio is played out based on the audio player after, the method is also wrapped
It includes:
The current play status of the web-page audio is shown in the audio player;
If the webpage has the function of display audio broadcast state, according to the currently playing shape of the web-page audio
State shows corresponding broadcast state in the webpage.
Optionally, the method further includes:
When the webpage switches to running background, the broadcast state of the web displaying is recorded;
When the webpage switches to foreground display, if broadcast state and the web-page audio of record is currently playing
State is inconsistent, then corresponding broadcast state is shown in the webpage according to the current play status of the web-page audio.
Optionally, it is described the web-page audio is played out based on the audio player after, the method is also wrapped
It includes:
When the webpage refreshes or closes, being associated with for the audio player and the browser kernel is disconnected.
Optionally, it is described disconnect being associated with of the audio player and the browser kernel after, the method is also wrapped
It includes:
Based on the audio player any web-page audio is downloaded from server;
When the option of operation for receiving the audio player trigger to the operational order of any web-page audio when,
Any web-page audio is operated accordingly based on the audio player.
Optionally, it is described preset audio player and browser kernel are associated after, the method further includes:
The shortcut icon of the audio player is shown on the designated position of the webpage;
When receiving homepage idsplay order, show that the homepage of the audio player, the homepage include
The option of operation of the audio player, the homepage idsplay order is by the behaviour on the shortcut icon of the audio player
It triggers.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (16)
1. a kind of method that web-page audio plays, which is characterized in that the method includes:
When receiving the play instruction to web-page audio, preset audio player is associated with browser kernel, institute
It refers to the audio provided by webpage to state web-page audio;
The web-page audio is played out based on the audio player;
It is right in the audio player based on the browser kernel when receiving the operational order to the web-page audio
The web-page audio is operated accordingly.
2. according to the method described in claim 1, it is characterized in that, it is described by preset audio player and browser kernel into
Row association, including:
Preset audio player is packaged based on the wrapper of browser kernel, so that the browser kernel calls institute
State audio player;
It is described when receiving the operational order to the web-page audio, based on the browser kernel in the audio player
In the web-page audio is operated accordingly, including:
When receiving the operational order to the web-page audio, the packet of the browser kernel is called according to the operational order
Layer is filled, the wrapper based on the browser kernel calls the audio player to grasp the web-page audio accordingly
Make.
3. according to the method described in claim 1, it is characterized in that, described work as the operational order received to the web-page audio
When, the web-page audio is operated accordingly in the audio player based on the browser kernel, including:
When receiving the first operational order, based on the browser kernel to the web-page audio in the audio player
It is operated accordingly, first operational order is by triggering the operation for playing control option on the webpage;Or
When receiving the second operational order, second operational order is sent to the browser kernel, is based on the browsing
Device kernel operates the web-page audio in the audio player accordingly, and second operational order is by described
The operation triggering of option of operation on audio player.
4. according to the method described in claim 3, it is characterized in that, the option of operation of the audio player is including at least following
It is one or more:Play control option, webpage plays record list option, play mode option, the off option, source page and jumps
Turn option.
5. according to the method described in claim 4, it is characterized in that, described be based on the audio player to the web-page audio
After playing out, the method further includes:
When receiving webpage broadcasting record list display instruction, show that the webpage pre-established plays record list, the net
Page plays source page address of the record list for web-page audio and the web-page audio that log history played, described
Webpage plays the instruction of record list display and is triggered by the operation for playing record list option to webpage on the audio player.
6. according to the method described in claim 4, it is characterized in that, described be based on the audio player to the web-page audio
After playing out, the method further includes:
If receive the source page jump instruction to any web-page audio, sent to the browser kernel described any
The source page address of web-page audio jumps to the source page of any web-page audio in a browser, and display is described to appoint
The source page of one web-page audio, the source page jump instruction to source page on the audio player by redirecting option
Operation triggering.
7. according to the method described in claim 4, it is characterized in that, described when receiving the second operational order, to described clear
Device kernel of looking at sends second operational order, based on the browser kernel to the webpage sound in the audio player
Frequency operated accordingly, second operational order by the audio player option of operation operation triggering, including:
When receiving out code immediately, to out code immediately described in browser kernel transmission, it is based on the browsing
Device kernel to the web-page audio stop the operation of broadcasting in the audio player, and the out code immediately is by right
The operation triggering of the off option on the audio player;Or,
When receiving timing out code, the timing out code is sent to the browser kernel, it is preset reaching
When the shut-in time, to the web-page audio stop the behaviour of broadcasting in the audio player based on the browser kernel
Make, the timing out code is by triggering the operation of the off option on the audio player.
8. according to the method described in claim 1, it is characterized in that, described be based on the audio player to the web-page audio
After playing out, the method further includes:
When receiving Audio conversion instruction, being associated with for the audio player and the browser kernel, and pause institute are disconnected
The broadcasting for stating web-page audio records the broadcast state of the web-page audio, and the Audio conversion instruction in the audio by playing
Operation triggering in device;
When receiving continue-to-play instruction, the audio player and the browser kernel are associated again, according to
The broadcast state of the web-page audio of record, continues to play the web-page audio, the continuation based on the audio player
Play instruction is triggered by the operation for playing control option on the webpage.
9. according to the method described in claim 1, it is characterized in that, described be based on the audio player to the web-page audio
After playing out, the method further includes:
The current play status of the web-page audio is shown in the audio player;
If the webpage has the function of display audio broadcast state, existed according to the current play status of the web-page audio
Corresponding broadcast state is shown in the webpage.
10. according to the method described in claim 9, it is characterized in that, the method further includes:
When the webpage switches to running background, the broadcast state of the web displaying is recorded;
When the webpage switches to foreground display, if the current play status of the broadcast state and the web-page audio of record
It is inconsistent, then corresponding broadcast state is shown in the webpage according to the current play status of the web-page audio.
11. according to the method described in claim 1, it is characterized in that, described be based on the audio player to the webpage sound
After frequency plays out, the method further includes:
When the webpage refreshes or closes, being associated with for the audio player and the browser kernel is disconnected.
12. according to the method for claim 11, which is characterized in that described to disconnect the audio player and the browser
After the association of kernel, the method further includes:
Based on the audio player any web-page audio is downloaded from server;
When the option of operation for receiving the audio player trigger to the operational order of any web-page audio when, be based on
The audio player operates any web-page audio accordingly.
13. according to the method described in claim 1, it is characterized in that, described by preset audio player and browser kernel
After being associated, the method further includes:
The shortcut icon of the audio player is shown on the designated position of the webpage;
When receiving homepage idsplay order, show that the homepage of the audio player, the homepage include described
The option of operation of audio player, the homepage idsplay order are touched by the operation on the shortcut icon of the audio player
Hair.
14. the device that a kind of web-page audio plays, which is characterized in that described device includes:
Relating module, for when receiving the play instruction to web-page audio, will preset audio player in browser
Core is associated, and the web-page audio refers to the audio provided by webpage;
Playing module plays out the web-page audio for being based on the audio player;
First operation module, for when receiving the operational order to the web-page audio, being existed based on the browser kernel
The web-page audio is operated accordingly in the audio player.
15. a kind of terminal, which is characterized in that the terminal includes processor and memory, is stored at least in the memory
One instruction, described instruction are loaded by the processor and are executed to realize the webpage sound as described in claim 1 to 13 is any
The method that frequency plays.
16. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, institute in the storage medium
It states instruction and is loaded by processor and executed the method that the web-page audio with realization as described in claim 1 to 13 is any plays.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810147447.XA CN108388628B (en) | 2018-02-12 | 2018-02-12 | Webpage audio playing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810147447.XA CN108388628B (en) | 2018-02-12 | 2018-02-12 | Webpage audio playing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108388628A true CN108388628A (en) | 2018-08-10 |
CN108388628B CN108388628B (en) | 2022-02-22 |
Family
ID=63069546
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810147447.XA Active CN108388628B (en) | 2018-02-12 | 2018-02-12 | Webpage audio playing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108388628B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109101166A (en) * | 2018-08-30 | 2018-12-28 | 广州酷狗计算机科技有限公司 | audio control method, device and storage medium |
CN109828737A (en) * | 2018-12-14 | 2019-05-31 | 平安万家医疗投资管理有限责任公司 | Control method, terminal device and computer readable storage medium that audio plays |
CN110045895A (en) * | 2018-12-13 | 2019-07-23 | 杭州网易云音乐科技有限公司 | Information processing method, system, medium and calculating equipment |
CN110277110A (en) * | 2019-06-27 | 2019-09-24 | 深圳前海微众银行股份有限公司 | A kind of recording of Webpage, playback method, device and terminal |
CN110286873A (en) * | 2019-06-19 | 2019-09-27 | 深圳市微课科技有限公司 | Web-page audio playback method, device, computer equipment and storage medium |
CN111367622A (en) * | 2020-03-09 | 2020-07-03 | 联通沃音乐文化有限公司 | System and method for playing audio without blocking mobile terminal website |
CN111372137A (en) * | 2020-03-13 | 2020-07-03 | 青岛海信宽带多媒体技术有限公司 | Method and device for automatically correcting player state by browser and display equipment |
CN112015944A (en) * | 2019-05-31 | 2020-12-01 | 北京车和家信息技术有限公司 | Method and device for playing audio in audio list and vehicle |
CN113517010A (en) * | 2021-08-03 | 2021-10-19 | 广州酷狗计算机科技有限公司 | Calling method and device of music playing function, electronic equipment and storage medium |
CN115470426A (en) * | 2022-09-02 | 2022-12-13 | 北京海泰方圆科技股份有限公司 | Browser kernel determining method and device, computer equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103777938A (en) * | 2012-10-25 | 2014-05-07 | 百度在线网络技术(北京)有限公司 | Playing method and device supporting multiple browsers |
CN105681841A (en) * | 2015-12-30 | 2016-06-15 | 广东欧珀移动通信有限公司 | Video play control method and system based on browser |
-
2018
- 2018-02-12 CN CN201810147447.XA patent/CN108388628B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103777938A (en) * | 2012-10-25 | 2014-05-07 | 百度在线网络技术(北京)有限公司 | Playing method and device supporting multiple browsers |
CN105681841A (en) * | 2015-12-30 | 2016-06-15 | 广东欧珀移动通信有限公司 | Video play control method and system based on browser |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109101166A (en) * | 2018-08-30 | 2018-12-28 | 广州酷狗计算机科技有限公司 | audio control method, device and storage medium |
CN110045895A (en) * | 2018-12-13 | 2019-07-23 | 杭州网易云音乐科技有限公司 | Information processing method, system, medium and calculating equipment |
CN109828737A (en) * | 2018-12-14 | 2019-05-31 | 平安万家医疗投资管理有限责任公司 | Control method, terminal device and computer readable storage medium that audio plays |
CN109828737B (en) * | 2018-12-14 | 2022-12-06 | 平安万家医疗投资管理有限责任公司 | Method for controlling audio playing, terminal device and computer readable storage medium |
CN112015944A (en) * | 2019-05-31 | 2020-12-01 | 北京车和家信息技术有限公司 | Method and device for playing audio in audio list and vehicle |
CN112015944B (en) * | 2019-05-31 | 2024-02-06 | 北京车和家信息技术有限公司 | Audio playing method and device in audio list and vehicle |
CN110286873A (en) * | 2019-06-19 | 2019-09-27 | 深圳市微课科技有限公司 | Web-page audio playback method, device, computer equipment and storage medium |
CN110277110A (en) * | 2019-06-27 | 2019-09-24 | 深圳前海微众银行股份有限公司 | A kind of recording of Webpage, playback method, device and terminal |
CN110277110B (en) * | 2019-06-27 | 2023-10-10 | 深圳前海微众银行股份有限公司 | Recording and playing method and device of network page and terminal |
CN111367622A (en) * | 2020-03-09 | 2020-07-03 | 联通沃音乐文化有限公司 | System and method for playing audio without blocking mobile terminal website |
CN111367622B (en) * | 2020-03-09 | 2024-08-06 | 联通沃音乐文化有限公司 | System and method for non-blocking playing audio of mobile terminal website |
CN111372137A (en) * | 2020-03-13 | 2020-07-03 | 青岛海信宽带多媒体技术有限公司 | Method and device for automatically correcting player state by browser and display equipment |
CN113517010A (en) * | 2021-08-03 | 2021-10-19 | 广州酷狗计算机科技有限公司 | Calling method and device of music playing function, electronic equipment and storage medium |
CN115470426A (en) * | 2022-09-02 | 2022-12-13 | 北京海泰方圆科技股份有限公司 | Browser kernel determining method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108388628B (en) | 2022-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108388628A (en) | The method and device that web-page audio plays | |
KR102336368B1 (en) | Method and apparatus for playing audio data | |
CN108845856A (en) | Data Binding Method, device, storage medium and equipment | |
WO2018184488A1 (en) | Video dubbing method and device | |
CN108401124B (en) | Video recording method and device | |
CN107888968A (en) | Player method, device and the computer-readable storage medium of live video | |
CN108182021A (en) | Multimedia messages methods of exhibiting, device, storage medium and equipment | |
CN108449641A (en) | Play method, apparatus, computer equipment and the storage medium of Media Stream | |
CN110502308A (en) | Style sheet switching method, device, computer equipment and storage medium | |
CN108966008A (en) | Live video back method and device | |
CN108833963A (en) | Method, computer equipment, readable storage medium storing program for executing and the system of display interface picture | |
CN108055587A (en) | Sharing method, device, mobile terminal and the storage medium of image file | |
CN110019929A (en) | Processing method, device and the computer readable storage medium of web page contents | |
CN106528735A (en) | Method and device for controlling browser to play media resources | |
KR20140031035A (en) | Mobile terminal and control method thereof | |
CN109346111A (en) | Data processing method, device, terminal and storage medium | |
WO2022227581A1 (en) | Resource display method and computer device | |
CN108111676A (en) | A kind of application control method and mobile terminal | |
CN110266982A (en) | The method and system of song is provided in recorded video | |
CN109800003A (en) | Using method for down loading, device, terminal and storage medium | |
CN109858237A (en) | Audio data collecting method, apparatus, terminal and storage medium | |
CN108848492A (en) | Enabling method, apparatus, terminal and the storage medium of subscriber identification card | |
CN107911777A (en) | A kind of ear returns processing method, device and the mobile terminal of function | |
CN109462770A (en) | Video playing control method, device, terminal and storage medium | |
CN110868642B (en) | Video playing method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |