From e95068d4b89801ec4f174840bbc91ebc3b3c3273 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 6 Jul 2017 16:47:38 +0530 Subject: Remove "DASH" button. * viewtube.js (option): Remove "dash". (createMyElement): Remove handling of "dash" action. (createMyPlayer): Remove panel "DASH" button. --- viewtube.js | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/viewtube.js b/viewtube.js index 0b0f308..86c9ecf 100644 --- a/viewtube.js +++ b/viewtube.js @@ -30,7 +30,7 @@ // Player var player = {}; - var option = {'definition': 'HD', 'container': 'MP4', 'dash': false, 'direct': false}; + var option = {'definition': 'HD', 'container': 'MP4', 'direct': false}; var mimetypes = { 'MPEG': 'video/mpeg', 'MP4': 'video/mp4', @@ -50,9 +50,6 @@ // ==========Functions========== // function createMyElement(type, content, event, action, target) { - function styleButton (button, state) { - styleMyElement(player[button], state ? {color: '#008080', textShadow: '0px 1px 1px #CCCCCC'} : {color: '#CCCCCC', textShadow: '0px 0px 0px'}); - } var obj = page.doc.createElement(type); if (content) { switch (type) { @@ -93,11 +90,6 @@ case 'close': page.body.removeChild(target); break; - case 'dash': - option['dash'] = !option['dash']; - styleButton('buttonDASH', option['dash']) - setMyOptions('dash', option['dash']); - break; } }, false); } @@ -163,19 +155,10 @@ styleMyElement(player['videoItem'], {padding: '0px', display: 'block', color: '#336699', fontSize: '12px', textShadow: '0px 1px 1px #CCCCCC', cursor: 'pointer'}); if (videoCode.indexOf('Video') != -1 || videoCode.indexOf('Audio') != -1) styleMyElement(player['videoItem'], {color: '#8F6B32'}); if (player['videoList'][videoCode] == 'DASH') styleMyElement(player['videoItem'], {color: '#CF4913'}); - if (player['videoList'][videoCode] != 'DASH' || option['dash']) - player['videoMenu'].appendChild(player['videoItem']); - else delete player['videoList'][videoCode]; + player['videoMenu'].appendChild(player['videoItem']); if (videoCode == 'Direct Video Link') styleMyElement(player['videoItem'], {color: '#00C0C0'}); } - /* Panel DASH Button */ - player['buttonDASH'] = createMyElement('div', 'MD', 'click', 'dash', ''); - player['buttonDASH'].title = '{MPEG-DASH: click to enable/disable DASH playback using the HTML5 video player (experimental)}'; - styleMyElement(player['buttonDASH'], {height: panelItemHeight + 'px', border: '1px solid #CCCCCC', borderRadius: '3px', padding: '0px 5px', display: 'inline', color: '#CCCCCC', fontSize: '12px', cursor: 'pointer'}); - if (option['dash']) styleMyElement(player['buttonDASH'], {color: '#008080', textShadow: '0px 1px 1px #CCCCCC'}); - player['playerPanel'].appendChild(player['buttonDASH']); - /* The Content */ player['contentWidth'] = player['playerWidth']; player['contentHeight'] = player['playerHeight'] - player['panelHeight'] - player['panelPadding'] * 2; -- cgit v1.2.3