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

hls updates

This commit is contained in:
Luke Pulverenti 2015-05-21 16:53:14 -04:00
parent 3beaf88745
commit 9e470c9f94
21 changed files with 315 additions and 164 deletions

View file

@ -119,10 +119,25 @@ if (!Array.prototype.filter) {
};
}
// TODO: There should be notification services, where each defines what it supports and the best service is chosen based on params
var WebNotifications = {
show: function (data) {
if (window.Notification) {
if (window.cordova && window.cordova.plugins && window.cordova.plugins.notification) {
window.cordova.plugins.notification.local.schedule({
id: new Date().getTime(),
title: data.title,
text: data.body,
//firstAt: monday_9_am,
//every: "week",
//sound: "file://sounds/reminder.mp3",
//data: { meetingId: "123#fg8" },
icon: data.icon
});
}
else if (window.Notification) {
var level = Notification.permissionLevel ? Notification.permissionLevel() : Notification.permission;
@ -196,10 +211,6 @@ var WebNotifications = {
});
}
}
},
supported: function () {
return window.Notification || window.webkitNotifications;
}
};