Fix JS error after project pdf file.
This commit is contained in:
parent
5ab8b3172b
commit
bc312efbb9
@ -23,15 +23,17 @@ angular.module('OpenSlidesApp.mediafiles.projector', ['OpenSlidesApp.mediafiles'
|
|||||||
|
|
||||||
// Allow the elements to render properly
|
// Allow the elements to render properly
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if ($scope.mediafile.is_pdf) {
|
if ($scope.mediafile) {
|
||||||
$scope.pdfName = mediafile.title;
|
if ($scope.mediafile.is_pdf) {
|
||||||
$scope.pdfUrl = mediafile.mediafileUrl;
|
$scope.pdfName = mediafile.title;
|
||||||
} else if ($scope.mediafile.is_video) {
|
$scope.pdfUrl = mediafile.mediafileUrl;
|
||||||
var player = angular.element.find('#video-player')[0];
|
} else if ($scope.mediafile.is_video) {
|
||||||
if ($scope.element.playing) {
|
var player = angular.element.find('#video-player')[0];
|
||||||
player.play();
|
if ($scope.element.playing) {
|
||||||
} else {
|
player.play();
|
||||||
player.pause();
|
} else {
|
||||||
|
player.pause();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 0);
|
}, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user