CN104484458A - Music playing method and music playing device - Google Patents
Music playing method and music playing device Download PDFInfo
- Publication number
- CN104484458A CN104484458A CN201410838241.3A CN201410838241A CN104484458A CN 104484458 A CN104484458 A CN 104484458A CN 201410838241 A CN201410838241 A CN 201410838241A CN 104484458 A CN104484458 A CN 104484458A
- Authority
- CN
- China
- Prior art keywords
- page
- music
- played
- playlist
- embedded
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/951—Indexing; Web crawling techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/60—Information retrieval; Database structures therefor; File system structures therefor of audio data
- G06F16/63—Querying
- G06F16/638—Presentation of query results
- G06F16/639—Presentation of query results using playlists
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Reverberation, Karaoke And Other Acoustics (AREA)
Abstract
本发明公开了一种音乐播放方法及装置,涉及音乐播放技术领域,所述方法包括:播放列表页面接收搜索结果页面发送的待播放音乐的链接地址,将所述待播放音乐的链接地址发送至嵌入于所述播放列表页面的网页播放器,以使所述网页播放器根据接收到的链接地址对所述待播放音乐进行播放。本发明通过将播放列表页面接收到的待播放音乐的链接地址发送至网页播放器,以使网页播放器根据接收到的链接地址对所述待播放音乐进行播放,无需跳转至第三方网站播放,从而有效提高了用户体验。另外,网页播放器是嵌入于播放列表页面中的,故而,在播放待播放音乐时,不会存在网页播放器和播放列表页面分开在两个页面进行展示的问题。
The invention discloses a music playing method and device, and relates to the technical field of music playing. The method comprises: the play list page receives the link address of the music to be played sent by the search result page, and sends the link address of the music to be played to A webpage player embedded in the playlist page, so that the webpage player can play the music to be played according to the received link address. The present invention sends the link address of the music to be played received on the play list page to the webpage player, so that the webpage player can play the music to be played according to the received link address without jumping to a third-party website for playback , thereby effectively improving the user experience. In addition, the webpage player is embedded in the playlist page, so when the music to be played is played, there is no problem that the webpage player and the playlist page are displayed on two separate pages.
Description
技术领域technical field
本发明涉及音乐播放技术领域,特别涉及一种音乐播放方法及装置。The invention relates to the technical field of music playing, in particular to a music playing method and device.
背景技术Background technique
随着互联网的快速普及,宽带网的全力推行,网络上的音乐文件越来越多,在这种背景下,传统的文本搜索方式已经不能满足人们的特殊需要,大家希望能更方便快捷地从网络上找到需要的音乐文件。With the rapid popularization of the Internet and the full implementation of the broadband network, there are more and more music files on the Internet. In this context, the traditional text search method can no longer meet people's special needs. Find the desired music files on the Internet.
现有技术中,将搜索到音乐文件进行播放时,通常是直接跳转至第三方网站播放,若再搜索到其它音乐文件,并播放该音乐文件时,则又会跳转至另一个第三方网站播放,导致用户通过浏览器搜索、播放多个音乐文件时,会开启多个网站页面分别播放音乐文件,严重影响用户体验。In the prior art, when a music file is found and played, it usually jumps directly to a third-party website to play, and if another music file is found and played, it will jump to another third party Website playback causes users to open multiple website pages to play music files separately when searching and playing multiple music files through a browser, seriously affecting user experience.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种音乐播放方法和相应的一种音乐播放装置。In view of the above problems, the present invention is proposed to provide a music playing method and a corresponding music playing device that overcome the above problems or at least partly solve the above problems.
依据本发明的一个方面,提供了一种音乐播放方法,所述方法包括:According to one aspect of the present invention, a kind of music playing method is provided, and described method comprises:
播放列表页面接收搜索结果页面发送的待播放音乐的链接地址,将所述待播放音乐的链接地址发送至嵌入于所述播放列表页面的网页播放器,以使所述网页播放器根据接收到的链接地址对所述待播放音乐进行播放。The playlist page receives the link address of the music to be played sent by the search result page, and sends the link address of the music to be played to the webpage player embedded in the playlist page, so that the webpage player according to the received The link address plays the music to be played.
可选地,所述将所述待播放音乐的链接地址发送至嵌入于所述播放列表页面的网页播放器,进一步包括:Optionally, the sending the link address of the music to be played to the webpage player embedded in the playlist page further includes:
将所述待播放音乐的链接地址通过postmessage函数发送至嵌入于所述播放列表页面的网页播放器。Send the link address of the music to be played to the webpage player embedded in the playlist page through the postmessage function.
可选地,所述播放列表页面将所述待播放音乐的链接地址发送至嵌入于所述播放列表页面的网页播放器,进一步包括:Optionally, the playlist page sends the link address of the music to be played to a webpage player embedded in the playlist page, further comprising:
所述播放列表页面将所述待播放音乐的链接地址通过代理页面发送至嵌入于所述播放列表页面的网页播放器。The playlist page sends the link address of the music to be played to the webpage player embedded in the playlist page through the proxy page.
可选地,所述播放列表页面将所述待播放音乐的链接地址通过代理页面发送至嵌入于所述播放列表页面的网页播放器,进一步包括:Optionally, the playlist page sends the link address of the music to be played to a webpage player embedded in the playlist page through a proxy page, further comprising:
所述播放列表页面将所述待播放音乐的链接地址插入消息队列的尾部,通过所述代理页面依次从所述消息队列中头部的消息发送至所述网页播放器。The playlist page inserts the link address of the music to be played into the tail of the message queue, and sends the message at the head of the message queue to the webpage player in sequence through the proxy page.
可选地,所述将所述当前播放音频的链接地址发送至嵌入于所述播放列表页面的网页播放器,进一步包括:Optionally, the sending the link address of the currently playing audio to the webpage player embedded in the playlist page further includes:
将所述当前播放音频的链接地址通过flash通信方式发送至嵌入于所述播放列表页面的网页播放器。Send the link address of the currently playing audio to the webpage player embedded in the playlist page through flash communication.
可选地,所述网页播放器通过框架iframe的形式嵌入于所述播放列表页面。Optionally, the webpage player is embedded in the playlist page in the form of a frame iframe.
依据本发明的另一个方面,提供了一种音乐播放装置,所述装置包括:播放列表页面和嵌入于所述播放列表页面中的网页播放器;According to another aspect of the present invention, a kind of music playback device is provided, and the device includes: a playlist page and a webpage player embedded in the playlist page;
所述播放列表页面,适于接收搜索结果页面发送的待播放音乐的链接地址,将所述待播放音乐的链接地址发送所述网页播放器;The play list page is adapted to receive the link address of the music to be played sent by the search result page, and send the link address of the music to be played to the webpage player;
所述网页播放器,适于根据接收到的链接地址对所述待播放音乐进行播放。The webpage player is adapted to play the music to be played according to the received link address.
可选地,所述播放列表页面,还适于将所述待播放音乐的链接地址通过postmessage函数发送至嵌入于所述播放列表页面的网页播放器。Optionally, the playlist page is further adapted to send the link address of the music to be played to a webpage player embedded in the playlist page through a postmessage function.
可选地,所述播放列表页面,还适于将所述待播放音乐的链接地址通过代理页面发送至嵌入于所述播放列表页面的网页播放器。Optionally, the playlist page is further adapted to send the link address of the music to be played to the webpage player embedded in the playlist page through the proxy page.
可选地,所述播放列表页面,还适于将所述待播放音乐的链接地址插入消息队列的尾部,通过所述代理页面依次将所述消息队列中头部的消息发送至所述网页播放器。Optionally, the playlist page is also suitable for inserting the link address of the music to be played into the tail of the message queue, and sending the message at the head of the message queue to the webpage for playback through the proxy page in turn. device.
可选地,所述播放列表页面,还适于将所述当前播放音频的链接地址通过flash通信方式发送至嵌入于所述播放列表页面的网页播放器。Optionally, the playlist page is further adapted to send the link address of the currently playing audio to a webpage player embedded in the playlist page through flash communication.
可选地,所述网页播放器通过框架iframe的形式嵌入于所述播放列表页面。Optionally, the webpage player is embedded in the playlist page in the form of a frame iframe.
本发明通过将播放列表页面接收到的待播放音乐的链接地址发送至网页播放器,以使网页播放器根据接收到的链接地址对所述待播放音乐进行播放,无需跳转至第三方网站播放,从而有效提高了用户体验。The present invention sends the link address of the music to be played received on the playlist page to the webpage player, so that the webpage player can play the music to be played according to the received link address without jumping to a third-party website for playback , thereby effectively improving the user experience.
另外,网页播放器是嵌入于播放列表页面中的,故而,在播放待播放音乐时,不会存在网页播放器和播放列表页面分开在两个页面进行展示的问题。In addition, the webpage player is embedded in the playlist page, so when the music to be played is played, there is no problem that the webpage player and the playlist page are displayed on two separate pages.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:
图1是本发明一个实施例的一种音乐播放方法的步骤流程图;Fig. 1 is a flow chart of the steps of a music playing method according to an embodiment of the present invention;
图2是本发明一个实施例的一种音乐播放方法的步骤流程图;Fig. 2 is a flow chart of the steps of a music playing method according to an embodiment of the present invention;
图3是本发明一个实施例的一种音乐播放方法的步骤流程图;Fig. 3 is a flow chart of the steps of a music playback method according to an embodiment of the present invention;
图4是本发明一个实施例的一种音乐播放方法的步骤流程图;Fig. 4 is a flow chart of the steps of a music playing method according to an embodiment of the present invention;
图5是本发明一个实施例的一种音乐播放装置的结构框图。Fig. 5 is a structural block diagram of a music playing device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例,对本发明的具体实施方式作进一步详细描述。以下实施例用于说明本发明,但不用来限制本发明的范围。The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
图1是本发明一个实施例的一种音乐播放方法的步骤流程图;参照图1,所述方法包括:Fig. 1 is a flow chart of the steps of a music playing method according to an embodiment of the present invention; with reference to Fig. 1, the method includes:
S101:播放列表页面接收搜索结果页面发送的待播放音乐的链接地址;S101: the playlist page receives the link address of the music to be played sent by the search result page;
需要说明的是,所述搜索结果页面中展示有与用户输入的搜索词相关的音乐信息。It should be noted that music information related to the search term input by the user is displayed on the search result page.
S102:所述播放列表页面将所述待播放音乐的链接地址发送至嵌入于所述播放列表页面的网页播放器,以使所述网页播放器根据接收到的链接地址对所述待播放音乐进行播放。S102: The playlist page sends the link address of the music to be played to the webpage player embedded in the playlist page, so that the webpage player performs the music to be played according to the received link address play.
可理解的是,可通过多种方式将所述网页播放器嵌入于所述播放列表页面中,例如:脚本文件等方式来实现,本实施例中,为便于实现,故而采用框架iframe的形式,即将所述网页播放器通过框架iframe的形式嵌入于所述播放列表页面。It can be understood that the webpage player can be embedded in the playlist page in a variety of ways, for example: script files and other ways to achieve, in this embodiment, for the convenience of implementation, the form of a frame iframe is adopted, That is, the webpage player is embedded in the playlist page in the form of a frame iframe.
本实施例中所述播放列表页面会将接收到的所述待播放音乐的链接地址发送至网页播放器,以使网页播放器根据接收到的链接地址对所述待播放音乐进行播放,无需跳转至第三方网站播放,从而有效提高了用户体验,另外,网页播放器是嵌入于所述播放列表页面中的,故而,在播放所述待播放音乐时,不会存在网页播放器和播放列表页面分开在两个页面进行展示的问题。In this embodiment, the playlist page will send the received link address of the music to be played to the webpage player, so that the webpage player can play the music to be played according to the received link address without skipping Go to a third-party website to play, thereby effectively improving the user experience. In addition, the webpage player is embedded in the playlist page, so when playing the music to be played, there will be no webpage player and playlist The problem of displaying the page separately on two pages.
图2是本发明一个实施例的一种音乐播放方法的步骤流程图;参照图2,所述方法包括:Fig. 2 is a flow chart of the steps of a music playing method according to an embodiment of the present invention; with reference to Fig. 2, the method includes:
S201:播放列表页面接收搜索结果页面发送的待播放音乐的链接地址;S201: the playlist page receives the link address of the music to be played sent by the search result page;
S202:所述播放列表页面将所述待播放音乐的链接地址通过postmessage函数发送至嵌入于所述播放列表页面的网页播放器,以使所述网页播放器根据接收到的链接地址对所述待播放音乐进行播放。S202: The playlist page sends the link address of the music to be played to the webpage player embedded in the playlist page through the postmessage function, so that the webpage player treats the music to be played according to the received link address Play music to play it.
可理解的是,所述网页播放器为一个独立的播放器页面,没有任何列表功能,可将其当成一个音频处理器。It can be understood that the webpage player is an independent player page without any list function, and can be regarded as an audio processor.
由于所述网页播放器为一个独立的播放器页面,并且所述网页播放器和播放列表页面之间通常不属于同一域名,故而所述网页播放器与播放列表页面之间存在跨域的数据传输问题。Since the webpage player is an independent player page, and the webpage player and the playlist page usually do not belong to the same domain name, there is cross-domain data transmission between the webpage player and the playlist page question.
本实施例中,步骤S202是通过高版本浏览器(例如:支持HTML5的浏览器)所支持的应用程序编程接口API中的postmessage函数来实现跨域的数据传输,该方式简单、且传输效率高,但由于该方式只有高版本浏览器才能支持,故而无法支持所有版本的浏览器。In this embodiment, step S202 is to realize cross-domain data transmission through the postmessage function in the application programming interface API supported by a high-version browser (for example: a browser supporting HTML5), which is simple and has high transmission efficiency , but since this method can only be supported by high-version browsers, it cannot support all versions of browsers.
图3是本发明一个实施例的一种音乐播放方法的步骤流程图;参照图3,所述方法包括:Fig. 3 is a flow chart of the steps of a music playing method according to an embodiment of the present invention; with reference to Fig. 3, the method includes:
S301:播放列表页面接收搜索结果页面发送的待播放音乐的链接地址;S301: The playlist page receives the link address of the music to be played sent by the search result page;
S302:所述播放列表页面将所述待播放音乐的链接地址通过代理页面发送至嵌入于所述播放列表页面的网页播放器,以使所述网页播放器根据接收到的链接地址对所述待播放音乐进行播放。S302: The playlist page sends the link address of the music to be played to the webpage player embedded in the playlist page through the proxy page, so that the webpage player treats the music to be played according to the received link address Play music to play it.
需要说明的是,步骤S302中可通过多种方式建立代理页面来实现跨域的数据传输,下面以一个具体的方式为例来建立代理页面:在所述播放列表页面中嵌入可通信的第一代理页面,在所述网页播放器中嵌入可通信的第二代理页面,所述第一代理页面和第二代理页面之间通过javascript中的window.name属性实现数据传输,从而使得所述播放列表页面和网页播放器之间能够实现跨域的数据传输;It should be noted that, in step S302, a proxy page can be established in various ways to realize cross-domain data transmission, and a specific method is used as an example to establish a proxy page below: a communicable first playlist page is embedded in the playlist page. Proxy page, embedding a communicable second proxy page in the web player, realizing data transmission between the first proxy page and the second proxy page through the window.name attribute in javascript, so that the playlist Cross-domain data transmission can be realized between the page and the web player;
当然,还可采用其他建立代理页面的方式来实现跨域的数据传输,本实施例对此不加以限制。Of course, other ways of establishing proxy pages can also be used to realize cross-domain data transmission, which is not limited in this embodiment.
由于本实施例是采用代理页面来实现跨域的数据传输,能够支持所有浏览器及平台,但存在传输性能不高、流程繁琐的缺点,容易导致丢包、页面未准备好等问题,为避免丢包现象、页面未准备好等问题,可通过消息队列机制,将待发送的消息进行排队,从而防止出现上述问题,可选地,步骤S302中,所述播放列表页面将所述待播放音乐的链接地址通过代理页面发送至嵌入于所述播放列表页面的网页播放器,进一步包括:Since this embodiment uses a proxy page to implement cross-domain data transmission, it can support all browsers and platforms, but has the disadvantages of low transmission performance and cumbersome process, which can easily lead to problems such as packet loss and unprepared pages. Problems such as packet loss phenomenon, page is not ready, etc., can queue up the message to be sent through the message queue mechanism, thereby prevent above-mentioned problem from occurring, optionally, in step S302, described play list page will be described music to be played The link address of is sent to the web player embedded in the playlist page through the proxy page, further comprising:
所述播放列表页面将所述待播放音乐的链接地址插入消息队列的尾部,通过所述代理页面依次从所述消息队列中头部的消息发送至所述网页播放器。The playlist page inserts the link address of the music to be played into the tail of the message queue, and sends the message at the head of the message queue to the webpage player in sequence through the proxy page.
图4是本发明一个实施例的一种音乐播放方法的步骤流程图;参照图4,所述方法包括:Fig. 4 is a flow chart of the steps of a music playing method according to an embodiment of the present invention; with reference to Fig. 4, the method includes:
S401:播放列表页面接收搜索结果页面发送的待播放音乐的链接地址;S401: the playlist page receives the link address of the music to be played sent by the search result page;
S402:将所述当前播放音频的链接地址通过flash通信方式发送至嵌入于所述播放列表页面的网页播放器,以使所述网页播放器根据接收到的链接地址对所述待播放音乐进行播放。S402: Send the link address of the currently playing audio to the webpage player embedded in the playlist page through flash communication, so that the webpage player can play the music to be played according to the received link address .
由于本实施例中,步骤S402是通过flash通信方式来实现跨域的数据传输,该方式简单、且传输效率高。Since in this embodiment, step S402 implements cross-domain data transmission through flash communication, this method is simple and has high transmission efficiency.
需要说明的是,所述播放列表页面除接收及发送所述待播放音乐的链接地址的功能外,还包括:追加歌曲、删除歌曲、清空列表、切换列表、全选操作、智能推荐、歌词显示、用户系统、音乐搜索等功能;It should be noted that, in addition to the function of receiving and sending the link address of the music to be played, the playlist page also includes: adding songs, deleting songs, clearing the list, switching lists, selecting all operations, intelligent recommendation, and displaying lyrics , user system, music search and other functions;
所述网页播放器除包括音乐播放的功能外,还包括:暂停、停止、下一首、上一首、音量调节器、进度显示及进程拖拽调节、播放模式切换、收藏等功能;In addition to the function of music playing, the webpage player also includes functions such as pause, stop, next song, previous song, volume adjuster, progress display and process drag and drop adjustment, play mode switching, and collection;
为便于实现所述网页播放器,可通过音频播放开源组件SoundManager(SoundManager为一个JavaScript库)来实现,开发者通过SoundManager可以控制浏览器上音频和视频的播放,它包装了Flash sound API,通过JavaScript和ActionScript来实现多媒体的互动,故而浏览器需要启用相关版本的Flash Player插件,所述网页播放器可支持MP3、MPEG4、M4A、MP4、OGG、OPUS及WAV等格式。For the convenience of realizing said web player, it can be realized by audio playback open source component SoundManager (SoundManager is a JavaScript library), the developer can control the playback of audio and video on the browser through SoundManager, which wraps the Flash sound API, through JavaScript To achieve multimedia interaction with ActionScript, the browser needs to enable the relevant version of the Flash Player plug-in. The web player can support formats such as MP3, MPEG4, M4A, MP4, OGG, OPUS and WAV.
可理解的是,所述播放列表页面和网页播放器可组合为一个音乐播放装置,故而,所述播放列表页面和网页播放器之间所传输的数据不局限于所述待播放音乐的链接地址,例如:网页播放器可向所述播放列表页面所接收到的“下一首”的指令,从而由所述播放列表页面确定待播放音乐,当然,所述播放列表页面和网页播放器之间还可传输其他数据,本实施例对此不加以限制。It can be understood that the playlist page and the webpage player can be combined into a music player, so the data transmitted between the playlist page and the webpage player is not limited to the link address of the music to be played , for example: the webpage player can receive the "next song" instruction to the playlist page, thereby determining the music to be played by the playlist page, of course, between the playlist page and the webpage player Other data may also be transmitted, which is not limited in this embodiment.
需要说明的是,所述播放列表页面和网页播放器之间可封装通信接口,由传递参数来进行通信,所述传递参数包括key和value,key表示命令的类型,value表示命令执行的内容。It should be noted that the communication interface can be encapsulated between the playlist page and the webpage player, and the communication is carried out by passing parameters, and the passing parameters include key and value, the key represents the type of the command, and the value represents the content of the command execution.
需要说明的是,在图1~4所示的实施例中,所述播放列表页面接收了搜索结果页面发送的待播放音乐的链接地址,而为了避免重复创建所述音乐播放装置(即为播放列表页面和网页播放器),以使当前浏览器中仅存在一个音乐播放装置,可选地,所述搜索结果页面在发送待播放音乐的链接地址之前,判断当前浏览器中是否存在所述音乐播放装置(可采用脚本来判断当前浏览器中是否存在所述音乐播放装置,当然还可选择其他方式),若所述当前浏览器中存在音乐播放装置,则将所述待播放音乐的链接地址发送至所述播放列表页面;It should be noted that, in the embodiments shown in FIGS. 1-4, the play list page has received the link address of the music to be played sent by the search result page, and in order to avoid repeated creation of the music player (that is, to play list page and webpage player), so that there is only one music player in the current browser, optionally, the search result page determines whether the music exists in the current browser before sending the link address of the music to be played Playing device (can adopt script to judge whether there is described music playing device in current browser, certainly can also select other modes), if there is music playing device in described current browser, then the link address of described music to be played sent to said playlist page;
若所述当前浏览器中不存在音乐播放装置,则在当前浏览器中创建音乐播放装置,再将所述待播放音乐的链接地址发送至所述音乐播放装置的播放列表页面。If there is no music playback device in the current browser, create a music playback device in the current browser, and then send the link address of the music to be played to the playlist page of the music playback device.
另外,由于所述搜索结果页面和播放列表页面通常不属于同一域名,故而所述搜索结果页面和播放列表页面之间也存在跨域的数据传输问题,为实现所述搜索结果页面和播放列表页面之间跨域的数据传输,也可采用postmessage函数、代理页面或flash通信方式来实现,由于过程与上述图2~4中的方式基本相同,故而在此不再赘述。In addition, since the search result page and the playlist page usually do not belong to the same domain name, there is also a cross-domain data transmission problem between the search result page and the playlist page. In order to realize the search result page and the playlist page The cross-domain data transmission between them can also be realized by postmessage function, proxy page or flash communication. Since the process is basically the same as that in the above-mentioned Figures 2-4, it will not be repeated here.
对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。For the method embodiment, for the sake of simple description, it is expressed as a series of action combinations, but those skilled in the art should know that the embodiment of the present invention is not limited by the described action order, because according to the embodiment of the present invention , certain steps may be performed in other order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
图5是本发明一个实施例的一种音乐播放装置的结构框图;参照图5,所述装置包括:播放列表页面501和嵌入于所述播放列表页面中的网页播放器502;Fig. 5 is a structural block diagram of a music playing device according to an embodiment of the present invention; referring to Fig. 5, the device includes: a playlist page 501 and a webpage player 502 embedded in the playlist page;
所述播放列表页面501,适于接收搜索结果页面发送的待播放音乐的链接地址,将所述待播放音乐的链接地址发送所述网页播放器;The playlist page 501 is adapted to receive the link address of the music to be played sent by the search result page, and send the link address of the music to be played to the webpage player;
所述网页播放器502,适于根据接收到的链接地址对所述待播放音乐进行播放。The webpage player 502 is adapted to play the music to be played according to the received link address.
在本发明的一种可选实施例中,所述播放列表页面,还适于将所述待播放音乐的链接地址通过postmessage函数发送至嵌入于所述播放列表页面的网页播放器。In an optional embodiment of the present invention, the playlist page is further adapted to send the link address of the music to be played to a webpage player embedded in the playlist page through a postmessage function.
在本发明的一种可选实施例中,所述播放列表页面,还适于将所述待播放音乐的链接地址通过代理页面发送至嵌入于所述播放列表页面的网页播放器。In an optional embodiment of the present invention, the playlist page is further adapted to send the link address of the music to be played to a webpage player embedded in the playlist page through a proxy page.
在本发明的一种可选实施例中,所述播放列表页面,还适于将所述待播放音乐的链接地址插入消息队列的尾部,通过所述代理页面依次将所述消息队列中头部的消息发送至所述网页播放器。In an optional embodiment of the present invention, the playlist page is also suitable for inserting the link address of the music to be played into the tail of the message queue, and sequentially inserting the link address of the head of the message queue through the proxy page A message is sent to the web player.
在本发明的一种可选实施例中,所述播放列表页面,还适于将所述当前播放音频的链接地址通过flash通信方式发送至嵌入于所述播放列表页面的网页播放器。In an optional embodiment of the present invention, the playlist page is further adapted to send the link address of the currently playing audio to a webpage player embedded in the playlist page through flash communication.
在本发明的一种可选实施例中,所述网页播放器通过框架iframe的形式嵌入于所述播放列表页面。In an optional embodiment of the present invention, the webpage player is embedded in the playlist page in the form of a frame iframe.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
应当注意的是,在本发明的装置的各个部件中,根据其要实现的功能而对其中的部件进行了逻辑划分,但是,本发明不受限于此,可以根据需要对各个部件进行重新划分或者组合,例如,可以将一些部件组合为单个部件,或者可以将一些部件进一步分解为更多的子部件。It should be noted that among the various components of the device of the present invention, the components are logically divided according to the functions to be realized, but the present invention is not limited thereto, and each component can be re-divided as required Or combined, for example, some components can be combined into a single component, or some components can be further broken down into more subcomponents.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the device according to the embodiments of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
以上实施方式仅用于说明本发明,而并非对本发明的限制,有关技术领域的普通技术人员,在不脱离本发明的精神和范围的情况下,还可以做出各种变化和变型,因此所有等同的技术方案也属于本发明的范畴,本发明的专利保护范围应由权利要求限定。The above embodiments are only used to illustrate the present invention, but not to limit the present invention. Those of ordinary skill in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all Equivalent technical solutions also belong to the category of the present invention, and the scope of patent protection of the present invention should be defined by the claims.
本发明公开了A1、一种音乐播放方法,所述方法包括:The invention discloses A1, a music playing method, said method comprising:
播放列表页面接收搜索结果页面发送的待播放音乐的链接地址,将所述待播放音乐的链接地址发送至嵌入于所述播放列表页面的网页播放器,以使所述网页播放器根据接收到的链接地址对所述待播放音乐进行播放。The playlist page receives the link address of the music to be played sent by the search result page, and sends the link address of the music to be played to the webpage player embedded in the playlist page, so that the webpage player according to the received The link address plays the music to be played.
A2、如A1所述的方法,所述将所述待播放音乐的链接地址发送至嵌入于所述播放列表页面的网页播放器,进一步包括:A2. The method as described in A1, sending the link address of the music to be played to the web player embedded in the playlist page, further comprising:
将所述待播放音乐的链接地址通过postmessage函数发送至嵌入于所述播放列表页面的网页播放器。Send the link address of the music to be played to the webpage player embedded in the playlist page through the postmessage function.
A3、如A1-A2任一项所述的方法,所述播放列表页面将所述待播放音乐的链接地址发送至嵌入于所述播放列表页面的网页播放器,进一步包括:A3. The method according to any one of A1-A2, the playlist page sends the link address of the music to be played to the webpage player embedded in the playlist page, further comprising:
所述播放列表页面将所述待播放音乐的链接地址通过代理页面发送至嵌入于所述播放列表页面的网页播放器。The playlist page sends the link address of the music to be played to the webpage player embedded in the playlist page through the proxy page.
A4、如A1-A3任一项所述的方法,所述播放列表页面将所述待播放音乐的链接地址通过代理页面发送至嵌入于所述播放列表页面的网页播放器,进一步包括:A4. The method according to any one of A1-A3, the playlist page sends the link address of the music to be played to the web player embedded in the playlist page through a proxy page, further comprising:
所述播放列表页面将所述待播放音乐的链接地址插入消息队列的尾部,通过所述代理页面依次从所述消息队列中头部的消息发送至所述网页播放器。The playlist page inserts the link address of the music to be played into the tail of the message queue, and sends the message at the head of the message queue to the webpage player in sequence through the proxy page.
A5、如A1-A4任一项所述的方法,所述将所述当前播放音频的链接地址发送至嵌入于所述播放列表页面的网页播放器,进一步包括:A5. The method according to any one of A1-A4, sending the link address of the currently playing audio to the webpage player embedded in the playlist page, further comprising:
将所述当前播放音频的链接地址通过flash通信方式发送至嵌入于所述播放列表页面的网页播放器。Send the link address of the currently playing audio to the webpage player embedded in the playlist page through flash communication.
A6、如A1-A5中任一项所述的方法,所述网页播放器通过框架iframe的形式嵌入于所述播放列表页面。A6. The method according to any one of A1-A5, wherein the webpage player is embedded in the playlist page in the form of a frame iframe.
本发明还公开了B7、一种音乐播放装置,所述装置包括:播放列表页面和嵌入于所述播放列表页面中的网页播放器;The present invention also discloses B7, a music playing device, which includes: a playlist page and a webpage player embedded in the playlist page;
所述播放列表页面,适于接收搜索结果页面发送的待播放音乐的链接地址,将所述待播放音乐的链接地址发送所述网页播放器;The play list page is adapted to receive the link address of the music to be played sent by the search result page, and send the link address of the music to be played to the webpage player;
所述网页播放器,适于根据接收到的链接地址对所述待播放音乐进行播放。The webpage player is adapted to play the music to be played according to the received link address.
B8、如B7所述的装置,所述播放列表页面,还适于将所述待播放音乐的链接地址通过postmessage函数发送至嵌入于所述播放列表页面的网页播放器。B8, the device as described in B7, the playlist page is also suitable for sending the link address of the music to be played to the webpage player embedded in the playlist page through the postmessage function.
B9、如B7-B8任一项所述的装置,所述播放列表页面,还适于将所述待播放音乐的链接地址通过代理页面发送至嵌入于所述播放列表页面的网页播放器。B9. The device according to any one of B7-B8, the playlist page is also suitable for sending the link address of the music to be played to the webpage player embedded in the playlist page through a proxy page.
B10、如B7-B9任一项所述的装置,所述播放列表页面,还适于将所述待播放音乐的链接地址插入消息队列的尾部,通过所述代理页面依次将所述消息队列中头部的消息发送至所述网页播放器。B10, the device as described in any one of B7-B9, described playlist page, also be suitable for the tail of the link address of described music to be played is inserted into the message queue, by described agent page in the described message queue successively The message in the header is sent to the webpage player.
B11、如B7-B10任一项所述的装置,所述播放列表页面,还适于将所述当前播放音频的链接地址通过flash通信方式发送至嵌入于所述播放列表页面的网页播放器。B11, as the device according to any one of B7-B10, the playlist page is also suitable for sending the link address of the currently playing audio to the webpage player embedded in the playlist page by means of flash communication.
B12、如B7-B11中任一项所述的装置,所述网页播放器通过框架iframe的形式嵌入于所述播放列表页面。B12. The device according to any one of B7-B11, wherein the webpage player is embedded in the playlist page in the form of a frame iframe.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410838241.3A CN104484458A (en) | 2014-12-29 | 2014-12-29 | Music playing method and music playing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410838241.3A CN104484458A (en) | 2014-12-29 | 2014-12-29 | Music playing method and music playing device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN104484458A true CN104484458A (en) | 2015-04-01 |
Family
ID=52758999
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410838241.3A Pending CN104484458A (en) | 2014-12-29 | 2014-12-29 | Music playing method and music playing device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104484458A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106331887A (en) * | 2016-08-30 | 2017-01-11 | 腾讯科技(深圳)有限公司 | Webpage player calling method, and multimedia file playing method and device |
| CN107959888A (en) * | 2016-10-14 | 2018-04-24 | 北京视联动力国际信息技术有限公司 | A kind of method and system of web player dynamic more new video total duration |
| CN109756779A (en) * | 2018-12-28 | 2019-05-14 | 深圳豪客互联网有限公司 | Video broadcasting method and device in a kind of application program |
| CN110286873A (en) * | 2019-06-19 | 2019-09-27 | 深圳市微课科技有限公司 | Web-page audio playback method, device, computer equipment and storage medium |
| CN113791752A (en) * | 2021-09-16 | 2021-12-14 | 深圳市芯中芯科技有限公司 | Method for synchronously controlling webpage music playing state through js in android system |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102117291A (en) * | 2009-12-30 | 2011-07-06 | 北京搜狗科技发展有限公司 | Method and system for displaying network resources |
| EP2677709A2 (en) * | 2007-12-07 | 2013-12-25 | Vidiense Technology Pty Ltd. | Method and system to display a video in an email |
| CN104243394A (en) * | 2013-06-06 | 2014-12-24 | 腾讯科技(深圳)有限公司 | Multimedia file playing method and device |
-
2014
- 2014-12-29 CN CN201410838241.3A patent/CN104484458A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2677709A2 (en) * | 2007-12-07 | 2013-12-25 | Vidiense Technology Pty Ltd. | Method and system to display a video in an email |
| CN102117291A (en) * | 2009-12-30 | 2011-07-06 | 北京搜狗科技发展有限公司 | Method and system for displaying network resources |
| CN104243394A (en) * | 2013-06-06 | 2014-12-24 | 腾讯科技(深圳)有限公司 | Multimedia file playing method and device |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106331887A (en) * | 2016-08-30 | 2017-01-11 | 腾讯科技(深圳)有限公司 | Webpage player calling method, and multimedia file playing method and device |
| CN106331887B (en) * | 2016-08-30 | 2020-02-28 | 腾讯科技(深圳)有限公司 | Calling method of webpage player, playing method and device of multimedia file |
| CN107959888A (en) * | 2016-10-14 | 2018-04-24 | 北京视联动力国际信息技术有限公司 | A kind of method and system of web player dynamic more new video total duration |
| CN107959888B (en) * | 2016-10-14 | 2019-03-19 | 视联动力信息技术股份有限公司 | A kind of method and system of web player dynamic more new video total duration |
| CN109756779A (en) * | 2018-12-28 | 2019-05-14 | 深圳豪客互联网有限公司 | Video broadcasting method and device in a kind of application program |
| CN110286873A (en) * | 2019-06-19 | 2019-09-27 | 深圳市微课科技有限公司 | Web-page audio playback method, device, computer equipment and storage medium |
| CN113791752A (en) * | 2021-09-16 | 2021-12-14 | 深圳市芯中芯科技有限公司 | Method for synchronously controlling webpage music playing state through js in android system |
| CN113791752B (en) * | 2021-09-16 | 2024-06-11 | 深圳市芯中芯科技有限公司 | Method for synchronously controlling webpage music playing state in android system through js |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104572953B (en) | Method and device for triggering music playing based on search engine result page (SERP) | |
| CN103544008B (en) | Method and device for playing audio in browsers | |
| WO2010054597A1 (en) | Processing method and apparatus of page resources | |
| US8024358B2 (en) | Consistent browser file download | |
| US20240176817A1 (en) | Display apparatus, background music providing method thereof and background music providing system | |
| CN104484458A (en) | Music playing method and music playing device | |
| WO2010054598A1 (en) | Method and apparatus for showing web page-related resources | |
| CN105898535A (en) | Play start speed improving method, video player and electronic device | |
| JP6665200B2 (en) | Multimedia information processing method, apparatus and system, and computer storage medium | |
| CN103034695A (en) | Method and device for sound control in browser | |
| CN108597546B (en) | Background music determination method and related equipment for recalling video | |
| CN101789001A (en) | Method and system for controlling sound in browser | |
| CN107390994A (en) | Interface presentation and device | |
| US9648123B2 (en) | Distributing content elements among devices | |
| CN108319708A (en) | Video playing method, device, storage medium and electronic equipment | |
| WO2013010369A1 (en) | Method and apparatus for acquiring audio/video link address in webpage | |
| CN104469528A (en) | A method, device and browser client for loading video data | |
| JP2018022386A (en) | Distribution apparatus, distribution method, distribution program, and information display program | |
| US20110167345A1 (en) | Method and apparatus for selective media download and playback | |
| CN104503839B (en) | Computing device optimization method and device based on audio | |
| CN105592232A (en) | Lyric synchronization method and device | |
| CN111031117B (en) | A multimedia file download method and related device | |
| US20140236586A1 (en) | Method and apparatus for communicating messages amongst a node, device and a user of a device | |
| CN108174300A (en) | Video playback control method, storage medium and terminal | |
| CN106713221A (en) | Multimedia file download method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150401 |
|
| RJ01 | Rejection of invention patent application after publication |