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

update camera upload

This commit is contained in:
Luke Pulverenti 2015-09-10 14:28:22 -04:00
parent 50dc5c4d1b
commit a2d603a31e
19 changed files with 404 additions and 141 deletions

View file

@ -839,15 +839,23 @@
self.supportsDirectPlay = function (mediaSource) {
if (mediaSource.SupportsDirectPlay && mediaSource.Protocol == 'Http' && !mediaSource.RequiredHttpHeaders.length) {
if (mediaSource.SupportsDirectPlay) {
// TODO: Need to verify the host is going to be reachable
return true;
}
if (mediaSource.Protocol == 'Http' && !mediaSource.RequiredHttpHeaders.length) {
if (mediaSource.SupportsDirectPlay && mediaSource.Protocol == 'File') {
// If this is the only way it can be played, then allow it
if (!mediaSource.SupportsDirectStream && !mediaSource.SupportsTranscoding) {
return true;
}
return FileSystemBridge.fileExists(mediaSource.Path);
// TODO: Need to verify the host is going to be reachable
return mediaSource.Path.toLowerCase().replace('https:', 'http').indexOf(ApiClient.serverAddress().toLowerCase().replace('https:', 'http').substring(0, 14)) == 0;
}
if (mediaSource.Protocol == 'File') {
return FileSystemBridge.fileExists(mediaSource.Path);
}
}
return false;