CN113613049A - 机顶盒媒体播放器进度条平滑拖动的方法 - Google Patents

机顶盒媒体播放器进度条平滑拖动的方法 Download PDF

Info

Publication number
CN113613049A
CN113613049A CN202110827910.7A CN202110827910A CN113613049A CN 113613049 A CN113613049 A CN 113613049A CN 202110827910 A CN202110827910 A CN 202110827910A CN 113613049 A CN113613049 A CN 113613049A
Authority
CN
China
Prior art keywords
fast forward
player
browser
progress
lasttime
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110827910.7A
Other languages
English (en)
Other versions
CN113613049B (zh
Inventor
李朋繁
房兰涛
胡中涛
修志远
谢恩鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunman Intelligent Technology Co ltd
Original Assignee
Shandong Yunman Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yunman Intelligent Technology Co ltd filed Critical Shandong Yunman Intelligent Technology Co ltd
Priority to CN202110827910.7A priority Critical patent/CN113613049B/zh
Publication of CN113613049A publication Critical patent/CN113613049A/zh
Application granted granted Critical
Publication of CN113613049B publication Critical patent/CN113613049B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof
    • H04N21/42607Internal components of the client ; Characteristics thereof for processing the incoming bitstream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/432Content retrieval operation from a local storage medium, e.g. hard-disk
    • H04N21/4325Content retrieval operation from a local storage medium, e.g. hard-disk by playing back content from the storage medium
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种机顶盒媒体播放器进度条平滑拖动的方法,完全基于Javascript和HTML功能实现,可以广泛适用于各类支持浏览器的机顶盒中,通过快进按键按下及松开的时间差来定位进度条拖动的目标位置,并可任意指定拖动位置与按键时间之间的倍率关系。使用浏览器帧动画回调方法requestAnimationFrame,最大限度利用浏览器重绘性能,实现流畅平滑的拖动进度显示。

Description

机顶盒媒体播放器进度条平滑拖动的方法
技术领域
本发明涉及流媒体播放技术领域,具体涉及一种机顶盒媒体播放器进度条平滑拖动的方法。
背景技术
随着计算机网络技术的不断发展,BS架构的系统被广泛应用于各行各业,在电视机顶盒行业中,由于web页面具有开发快速,更新便捷等特点,被广泛应用于各类机顶盒应用中,其中机顶盒的视频播放功能作为机顶盒的主要功能,其流畅度决定着视频播放器的用户体验,现阶段,基于web页面开发的媒体播放器使用的快进快退方式为,响应每一次按键进行固定时长的快进,显示界面上进度条为点断式前进,对于用户使用并不友好。
发明内容
本发明为了克服以上技术的不足,提供了一种实现流畅平滑的拖动机顶盒媒体播放器进度条的方法。
本发明克服其技术问题所采用的技术方案是:
一种机顶盒媒体播放器进度条平滑拖动的方法,包括如下步骤:
a)当用户按下方向键时,判断机顶盒的媒体播放器是否处于快进状态;
b)如果播放器不处于快进状态,则调用浏览器windows.requestAnimationFrame函数等待浏览器空闲时异步执行快进操作;
c)将播放器标记为快进状态;
d)当用户松开方向键时,标记播放器不处于快进状态;
e)用户按键响应完成后,如果标记播放器处于播放状态,则通过浏览器帧动画requestAnimationFrame方法触发一次快进操作。
进一步的,步骤e)包括如下步骤:
e-1)用户按键响应完成后记录当前时间时间戳timestamp;
e-2)判断上次快进时间lasttime是否为0;
e-3)如果上次快进时间lasttime为0,则设置上次快进时间lasttime等于当前时间时间戳timestamp;
e-4)如果上次快进时间lasttime不为0,则记录快进时间差difftime,快进时间差difftime等于当前时间时间戳timestamp减上次快进时间lasttime;
e-5)根据播放器当前进度pos和快进时间差difftime计算目标进度位置pos;
e-6)更新播放器进度条显示位置为目标进度位置pos;
e-7)判断播放器是否是快进状态;
e-8)如果处于快进状态,则调用浏览器windows.requestAnimationFrame函数等待浏览器下次空闲时异步执行快速操作并返回执行步骤e-1);
e-9)如果不处于快进状态,则判定当前快进动作结束,重置上次快进时间lasttime为0;
e-10)将视频播放位置定位为目标进度位置pos,结束本次快进动作。
进一步的,步骤e-5)中目标进度位置pos等于当前进度pos加快进时间差difftime乘以快进倍率。
本发明的有益效果是:完全基于Javascript和HTML功能实现,可以广泛适用于各类支持浏览器的机顶盒中,通过快进按键按下及松开的时间差来定位进度条拖动的目标位置,并可任意指定拖动位置与按键时间之间的倍率关系。使用浏览器帧动画回调方法requestAnimationFrame,最大限度利用浏览器重绘性能,实现流畅平滑的拖动进度显示。
附图说明
图1为本发明的方法流程图。
具体实施方式
下面结合附图1对本发明做进一步说明。
一种机顶盒媒体播放器进度条平滑拖动的方法,包括如下步骤:
a)当用户按下方向键时,判断机顶盒的媒体播放器是否处于快进状态;
b)如果播放器不处于快进状态,则调用浏览器windows.requestAnimationFrame函数等待浏览器空闲时异步执行快进操作;
c)将播放器标记为快进状态;
d)当用户松开方向键时,标记播放器不处于快进状态;
e)用户按键响应完成后,如果标记播放器处于播放状态,则通过浏览器帧动画requestAnimationFrame方法触发一次快进操作。
完全基于Javascript和HTML功能实现,可以广泛适用于各类支持浏览器的机顶盒中,通过快进按键按下及松开的时间差来定位进度条拖动的目标位置,并可任意指定拖动位置与按键时间之间的倍率关系。使用浏览器帧动画回调方法requestAnimationFrame,最大限度利用浏览器重绘性能,实现流畅平滑的拖动进度显示。
实施例1:
步骤e)包括如下步骤:
e-1)用户按键响应完成后记录当前时间时间戳timestamp;
e-2)判断上次快进时间lasttime是否为0;
e-3)如果上次快进时间lasttime为0,则设置上次快进时间lasttime等于当前时间时间戳timestamp,即(lasttime=timestamp);
e-4)如果上次快进时间lasttime不为0,则记录快进时间差difftime,快进时间差difftime等于当前时间时间戳timestamp减上次快进时间lasttime,即(difftime=timestamp-lasttime);
e-5)根据播放器当前进度pos和快进时间差difftime计算目标进度位置pos;
e-6)更新播放器进度条显示位置为目标进度位置pos;
e-7)判断播放器是否是快进状态;
e-8)如果处于快进状态(即按键未松开),则调用浏览器windows.requestAnimationFrame函数等待浏览器下次空闲时异步执行快速操作并返回执行步骤e-1);
e-9)如果不处于快进状态(即按键松开),则判定当前快进动作结束,重置上次快进时间lasttime为0;
e-10)将视频播放位置定位为目标进度位置pos,结束本次快进动作。
实施例2:
步骤e-5)中目标进度位置pos等于当前进度pos加快进时间差difftime乘以快进倍率,即(目标进度位置pos=当前进度pos+difftime*快进倍率)。
最后应说明的是:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (3)

1.一种机顶盒媒体播放器进度条平滑拖动的方法,其特征在于,包括如下步骤:
a)当用户按下方向键时,判断机顶盒的媒体播放器是否处于快进状态;
b)如果播放器不处于快进状态,则调用浏览器windows.requestAnimationFrame函数等待浏览器空闲时异步执行快进操作;
c)将播放器标记为快进状态;
d)当用户松开方向键时,标记播放器不处于快进状态;
e)用户按键响应完成后,如果标记播放器处于播放状态,则通过浏览器帧动画requestAnimationFrame方法触发一次快进操作。
2.根据权利要求1所述的机顶盒媒体播放器进度条平滑拖动的方法,其特征在于:步骤e)包括如下步骤:
e-1)用户按键响应完成后记录当前时间时间戳timestamp;
e-2)判断上次快进时间lasttime是否为0;
e-3)如果上次快进时间lasttime为0,则设置上次快进时间lasttime等于当前时间时间戳timestamp;
e-4)如果上次快进时间lasttime不为0,则记录快进时间差difftime,快进时间差difftime等于当前时间时间戳timestamp减上次快进时间lasttime;
e-5)根据播放器当前进度pos和快进时间差difftime计算目标进度位置pos;
e-6)更新播放器进度条显示位置为目标进度位置pos;
e-7)判断播放器是否是快进状态;
e-8)如果处于快进状态,则调用浏览器windows.requestAnimationFrame函数等待浏览器下次空闲时异步执行快速操作并返回执行步骤e-1);
e-9)如果不处于快进状态,则判定当前快进动作结束,重置上次快进时间lasttime为0;
e-10)将视频播放位置定位为目标进度位置pos,结束本次快进动作。
3.根据权利要求1所述的机顶盒媒体播放器进度条平滑拖动的方法,其特征在于:步骤e-5)中目标进度位置pos等于当前进度pos加快进时间差difftime乘以快进倍率。
CN202110827910.7A 2021-07-22 2021-07-22 机顶盒媒体播放器进度条平滑拖动的方法 Active CN113613049B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110827910.7A CN113613049B (zh) 2021-07-22 2021-07-22 机顶盒媒体播放器进度条平滑拖动的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110827910.7A CN113613049B (zh) 2021-07-22 2021-07-22 机顶盒媒体播放器进度条平滑拖动的方法

Publications (2)

Publication Number Publication Date
CN113613049A true CN113613049A (zh) 2021-11-05
CN113613049B CN113613049B (zh) 2023-04-07

Family

ID=78338052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110827910.7A Active CN113613049B (zh) 2021-07-22 2021-07-22 机顶盒媒体播放器进度条平滑拖动的方法

Country Status (1)

Country Link
CN (1) CN113613049B (zh)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120185570A1 (en) * 2010-07-21 2012-07-19 Nokia Corporation Method and Apparatus for Indicating Switching Points in a Streaming Session
CN103279352A (zh) * 2013-05-31 2013-09-04 北京小米科技有限责任公司 多级进度条、进度控制的方法和装置
CN103596059A (zh) * 2013-11-21 2014-02-19 乐视致新电子科技(天津)有限公司 智能电视媒体播放器及其播放进度调整方法、智能电视
CN104602117A (zh) * 2015-01-31 2015-05-06 华为技术有限公司 一种倍速播放视频的方法及装置
CN104822091A (zh) * 2015-04-29 2015-08-05 努比亚技术有限公司 视频播放进度控制方法、装置及移动终端
US20150326912A1 (en) * 2014-05-12 2015-11-12 Echostar Technologies L.L.C. Selective placement of progress bar
CN105578216A (zh) * 2015-12-21 2016-05-11 武汉市烽视威科技有限公司 一种实现hls点播快进快退的方法
CN106331871A (zh) * 2015-07-08 2017-01-11 阿里巴巴集团控股有限公司 一种实现视频流快进或快退的方法及装置
CN106888386A (zh) * 2011-09-23 2017-06-23 台湾积体电路制造股份有限公司 管理响应于网络条件的视频传输的系统和方法
CN109767771A (zh) * 2019-03-04 2019-05-17 出门问问信息科技有限公司 一种播放进度控制方法、智能穿戴设备及多媒体显示设备
CN111898055A (zh) * 2020-08-10 2020-11-06 冯帆 一种浏览器网页的录屏与回放方法
CN112104915A (zh) * 2020-09-14 2020-12-18 腾讯科技(深圳)有限公司 一种视频数据处理方法、装置及存储介质

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120185570A1 (en) * 2010-07-21 2012-07-19 Nokia Corporation Method and Apparatus for Indicating Switching Points in a Streaming Session
CN106888386A (zh) * 2011-09-23 2017-06-23 台湾积体电路制造股份有限公司 管理响应于网络条件的视频传输的系统和方法
CN103279352A (zh) * 2013-05-31 2013-09-04 北京小米科技有限责任公司 多级进度条、进度控制的方法和装置
CN103596059A (zh) * 2013-11-21 2014-02-19 乐视致新电子科技(天津)有限公司 智能电视媒体播放器及其播放进度调整方法、智能电视
US20160269803A1 (en) * 2013-11-21 2016-09-15 Le Shi Zhi Xin Electronic Technology (Tianjin) Limited Smart tv media player and playback progress adjustment method thereof, and smart tv
US20150326912A1 (en) * 2014-05-12 2015-11-12 Echostar Technologies L.L.C. Selective placement of progress bar
CN104602117A (zh) * 2015-01-31 2015-05-06 华为技术有限公司 一种倍速播放视频的方法及装置
CN104822091A (zh) * 2015-04-29 2015-08-05 努比亚技术有限公司 视频播放进度控制方法、装置及移动终端
WO2017005098A1 (zh) * 2015-07-08 2017-01-12 阿里巴巴集团控股有限公司 一种实现视频流快进或快退的方法及装置
CN106331871A (zh) * 2015-07-08 2017-01-11 阿里巴巴集团控股有限公司 一种实现视频流快进或快退的方法及装置
CN105578216A (zh) * 2015-12-21 2016-05-11 武汉市烽视威科技有限公司 一种实现hls点播快进快退的方法
CN109767771A (zh) * 2019-03-04 2019-05-17 出门问问信息科技有限公司 一种播放进度控制方法、智能穿戴设备及多媒体显示设备
CN111898055A (zh) * 2020-08-10 2020-11-06 冯帆 一种浏览器网页的录屏与回放方法
CN112104915A (zh) * 2020-09-14 2020-12-18 腾讯科技(深圳)有限公司 一种视频数据处理方法、装置及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
薄涛;: "基于嵌入式Linux的数字系统设计" *

Also Published As

Publication number Publication date
CN113613049B (zh) 2023-04-07

Similar Documents

Publication Publication Date Title
JP4290995B2 (ja) マルチメディアプレゼンテーション
JP5583733B2 (ja) ビデオ内容の低帯域幅再生位置プレビューを行うための装置および方法
US20060161671A1 (en) Method and systems for capture and replay of remote presentation protocol data
EP1890428A1 (en) Methods and systems for capture, replay and real-time seeking in remote presentation protocols
CN113613049B (zh) 机顶盒媒体播放器进度条平滑拖动的方法
US20160119661A1 (en) On-Demand Metadata Insertion into Single-Stream Content
TW201720175A (zh) 在視訊串流中實現的互動式應用程式
TWI598835B (zh) 終端裝置及儲存媒體
CN106528695A (zh) 一种通过鼠标拖动展示视频缩略图的方法
CN104349177A (zh) 一种在桌面云下转向播放多媒体文件的方法、虚拟机及系统
CN108875068B (zh) 一种应用于智能电视的数据信息定位方法
CN102831630B (zh) 一种动画渲染方法及装置
CN105898608A (zh) 视频播放控制方法及浏览器
US20140304233A1 (en) System and method for maintaining cue point data structure independent of recorded time-varying content
WO2023231717A9 (zh) 动效生成方法、装置、介质及设备
CN111372137B (zh) 浏览器自动修正播放器状态的方法、装置及显示设备
CN109388716B (zh) 关系图更新方法及设备
EP2860733A1 (en) Multimedia file playback method, playback apparatus and system
CN109117277B (zh) 异步环境中模拟同步阻塞的方法及装置、存储介质、服务器、终端
CN115495185A (zh) 显示页面元素的方法及装置
JP6466531B2 (ja) 出力制御プログラム、出力制御装置及び出力制御方法
CN111984223A (zh) 一种浏览器切换新窗口后原页面静音的控制方法以及控制装置
KR20220027904A (ko) Mp4 파일을 온라인으로 재생하는 방법, 장치, 전자 기기, 저장 매체 및 컴퓨터 프로그램
CN112769928A (zh) 一种基于业务场景的信息交互方法及设备
JP6616531B2 (ja) 出力制御プログラム、出力制御装置及び出力制御方法

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 250000 West Zone, North 1st floor, S06 building, No. 1036, Langchao Road, high tech Zone, Jinan, Shandong Province

Applicant after: Shandong Inspur Ultra HD Video Industry Co.,Ltd.

Address before: 250000 West Zone, North 1st floor, S06 building, No. 1036, Langchao Road, high tech Zone, Jinan, Shandong Province

Applicant before: Shandong Inspur Yunman Intelligent Technology Co.,Ltd.

Address after: 250000 West Zone, North 1st floor, S06 building, No. 1036, Langchao Road, high tech Zone, Jinan, Shandong Province

Applicant after: Shandong Inspur Yunman Intelligent Technology Co.,Ltd.

Address before: 250101 west area, North 1st floor, S06 building, 1036 Chaochao Road, high tech Zone, Jinan City, Shandong Province

Applicant before: SHANDONG YUNMAN INTELLIGENT TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant