1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

3.0.5621.2

This commit is contained in:
Luke Pulverenti 2015-05-25 13:32:22 -04:00
parent 2e982826bb
commit 4e86a39f8c
25 changed files with 651 additions and 550 deletions

View file

@ -0,0 +1,50 @@
(function () {
function showPlayerSelectionMenu(item, url, mimeType) {
window.plugins.launcher.launch({
uri: url,
dataType: mimeType
}, function () {
console.log('plugin launch success');
ExternalPlayer.onPlaybackStart();
}, function () {
console.log('plugin launch error');
ExternalPlayer.onPlaybackStart();
});
}
function getExternalPlayers(url, mimeType) {
var deferred = $.Deferred();
window.plugins.launcher.canLaunch({
uri: url,
dataType: mimeType,
getAppList: true
}, function (data) {
console.log('plugin canLaunch succcess');
var players = data.appList.map(function (p) {
});
deferred.resolveWith(null, [players]);
}, function () {
console.log('plugin canLaunch error');
deferred.reject();
});
deferred.resolveWith(null, [players]);
return deferred.promise();
}
window.ExternalPlayer.getExternalPlayers = getExternalPlayers;
window.ExternalPlayer.showPlayerSelectionMenu = showPlayerSelectionMenu;
})();