Opening YouTube videos in third-party app
Moderators: FranklinDM, Lootyhoof
-
- Apollo supporter
- Posts: 47
- Joined: 2015-06-28, 03:49
- Location: WI
Opening YouTube videos in third-party app
Hello:
Assuming that I have a third-party application installed in my computer that can play YouTube videos... is there a way that every time I click on a YouTube link the video opens in the third-party application instead of in Pale Moon (perhaps by using an addon-on)?
Thanks!
Assuming that I have a third-party application installed in my computer that can play YouTube videos... is there a way that every time I click on a YouTube link the video opens in the third-party application instead of in Pale Moon (perhaps by using an addon-on)?
Thanks!
-
- Astronaut
- Posts: 666
- Joined: 2018-05-17, 02:34
- Location: Los Berros Canyon, California
-
- Moon lover
- Posts: 83
- Joined: 2022-03-08, 22:02
Re: Opening YouTube videos in third-party app
If you use Windows, you can try the add-on described in this post (Add-on Version II):
viewtopic.php?f=46&t=28494&sid=824b129a ... 22#p229411
-
- Keeps coming back
- Posts: 939
- Joined: 2021-01-26, 11:18
Re: Opening YouTube videos in third-party app
If the problem is that the video opens slowly, you can try the Greasemonkey script. It forces the video to open in the full window and the page loads very quickly. You may not need an external player.
Code: Select all
// ==UserScript==
// @name youtube
// @namespace yt2
// @include https://www.youtube.com/watch*
// @run-at document-start
// @version 1
// @grant none
// ==/UserScript==
//=======================================================================//
(function() {
var _isstyleinjected = false;
document.addEventListener("beforescriptexecute", function(e) {
if(
e.target.src.indexOf('webcomponents-ce-sd.js') >= 0 ||
e.target.src.indexOf('webcomponents-all-noPatch.js') >= 0 ||
e.target.src.indexOf('network.js') >= 0 ||
e.target.src.indexOf('web-animations-next-lite.min.js') >= 0 ||
e.target.src.indexOf('desktop_polymer_legacy_browsers.js') >= 0 ||
e.target.src.indexOf('intersection-observer.min.js') >= 0 ||
e.target.src.indexOf('scheduler.js') >= 0 ||
e.target.src.indexOf('desktop_polymer.js') >= 0
) {
e.preventDefault();
e.stopPropagation();
return;
};
if(!_isstyleinjected) {
_isstyleinjected = true;
var hd = document.querySelector('head');
var hd2 = document.createElement("head");
hd.parentNode.insertBefore(hd2, hd.nextSibling);
var st = document.createElement("style");
st.innerHTML =
'body * { visibility: hidden; } ' +
'#movie_player, #movie_player * { visibility: visible; } ' +
'body { overflow: hidden; } ' +
'video.video-stream.html5-main-video, #player-api, ' +
'#movie_player, #movie_playervideo { position: fixed !important; ' +
'width: 100% !important; height: 100% !important; ' +
'top:0px !important; left:0px !important; } ' +
'#movie_player { z-index: 10000 !important; } ' +
'div.ytp-right-controls button[data-tooltip-target-id="ytp-autonav-toggle-button"], ' +
'div.ytp-right-controls button.ytp-size-button, ' +
'div.ytp-right-controls button.ytp-pip-button, ' +
'div.ytp-right-controls button.ytp-miniplayer-button, ' +
'div.ytp-right-controls button.ytp-fullscreen-button ' +
'{ display: none !important; } ' +
'div.ytp-volume-panel { width: 52px !important; } ' +
'div.ytp-ad-overlay-container { display:none !important; }';
hd2.appendChild(st);
};
}, true);
})();
-
- Keeps coming back
- Posts: 827
- Joined: 2017-10-10, 21:20
Re: Opening YouTube videos in third-party app
Does that imply that the video would start playing as soon as the page loads? Would there be any way still to require clicking the play button?Kris_88 wrote: ↑2022-09-11, 12:38If the problem is that the video opens slowly, you can try the Greasemonkey script. It forces the video to open in the full window and the page loads very quickly. You may not need an external player.
Code: Select all
// ==UserScript== // @name youtube // @namespace yt2 // @include https://www.youtube.com/watch* // @run-at document-start // @version 1 // @grant none // ==/UserScript== //=======================================================================// (function() { var _isstyleinjected = false; document.addEventListener("beforescriptexecute", function(e) { if( e.target.src.indexOf('webcomponents-ce-sd.js') >= 0 || e.target.src.indexOf('webcomponents-all-noPatch.js') >= 0 || e.target.src.indexOf('network.js') >= 0 || e.target.src.indexOf('web-animations-next-lite.min.js') >= 0 || e.target.src.indexOf('desktop_polymer_legacy_browsers.js') >= 0 || e.target.src.indexOf('intersection-observer.min.js') >= 0 || e.target.src.indexOf('scheduler.js') >= 0 || e.target.src.indexOf('desktop_polymer.js') >= 0 ) { e.preventDefault(); e.stopPropagation(); return; }; if(!_isstyleinjected) { _isstyleinjected = true; var hd = document.querySelector('head'); var hd2 = document.createElement("head"); hd.parentNode.insertBefore(hd2, hd.nextSibling); var st = document.createElement("style"); st.innerHTML = 'body * { visibility: hidden; } ' + '#movie_player, #movie_player * { visibility: visible; } ' + 'body { overflow: hidden; } ' + 'video.video-stream.html5-main-video, #player-api, ' + '#movie_player, #movie_playervideo { position: fixed !important; ' + 'width: 100% !important; height: 100% !important; ' + 'top:0px !important; left:0px !important; } ' + '#movie_player { z-index: 10000 !important; } ' + 'div.ytp-right-controls button[data-tooltip-target-id="ytp-autonav-toggle-button"], ' + 'div.ytp-right-controls button.ytp-size-button, ' + 'div.ytp-right-controls button.ytp-pip-button, ' + 'div.ytp-right-controls button.ytp-miniplayer-button, ' + 'div.ytp-right-controls button.ytp-fullscreen-button ' + '{ display: none !important; } ' + 'div.ytp-volume-panel { width: 52px !important; } ' + 'div.ytp-ad-overlay-container { display:none !important; }'; hd2.appendChild(st); }; }, true); })();
-
- Keeps coming back
- Posts: 939
- Joined: 2021-01-26, 11:18
Re: Opening YouTube videos in third-party app
When not in a background tab, as normal for youtube.
it is possible. 2 additional lines.
Code: Select all
// ==UserScript==
// @name youtube
// @namespace yt2
// @include https://www.youtube.com/watch*
// @run-at document-start
// @version 1
// @grant none
// ==/UserScript==
//=======================================================================//
(function() {
var _isstyleinjected = false;
document.addEventListener("beforescriptexecute", function(e) {
var pl = document.querySelector('div[id="movie_player"]');
if(pl && pl.pauseVideo) pl.pauseVideo();
if(
e.target.src.indexOf('webcomponents-ce-sd.js') >= 0 ||
e.target.src.indexOf('webcomponents-all-noPatch.js') >= 0 ||
e.target.src.indexOf('network.js') >= 0 ||
e.target.src.indexOf('web-animations-next-lite.min.js') >= 0 ||
e.target.src.indexOf('desktop_polymer_legacy_browsers.js') >= 0 ||
e.target.src.indexOf('intersection-observer.min.js') >= 0 ||
e.target.src.indexOf('scheduler.js') >= 0 ||
e.target.src.indexOf('desktop_polymer.js') >= 0
) {
e.preventDefault();
e.stopPropagation();
// return;
};
if(!_isstyleinjected) {
_isstyleinjected = true;
var hd = document.querySelector('head');
var hd2 = document.createElement("head");
hd.parentNode.insertBefore(hd2, hd.nextSibling);
var st = document.createElement("style");
st.innerHTML =
'body * { visibility: hidden; } ' +
'#movie_player, #movie_player * { visibility: visible; } ' +
'body { overflow: hidden; } ' +
'video.video-stream.html5-main-video, #player-api, ' +
'#movie_player, #movie_playervideo { position: fixed !important; ' +
'width: 100% !important; height: 100% !important; ' +
'top:0px !important; left:0px !important; } ' +
'#movie_player { z-index: 10000 !important; } ' +
'div.ytp-right-controls button[data-tooltip-target-id="ytp-autonav-toggle-button"], ' +
'div.ytp-right-controls button.ytp-size-button, ' +
'div.ytp-right-controls button.ytp-pip-button, ' +
'div.ytp-right-controls button.ytp-miniplayer-button, ' +
'div.ytp-right-controls button.ytp-fullscreen-button ' +
'{ display: none !important; } ' +
'div.ytp-volume-panel { width: 52px !important; } ' +
'div.ytp-ad-overlay-container { display:none !important; }';
hd2.appendChild(st);
};
}, true);
})();
-
- Fanatic
- Posts: 118
- Joined: 2015-12-17, 18:28
- Location: UK
Re: Opening YouTube videos in third-party app
Pale Moon and Epyrus on Arch Linux.