Merge pull request #2707 from emanuelschuetze/fix-js-error

Fix JS error after project pdf file.
This commit is contained in:
Norman Jäckel 2016-12-01 10:22:08 +01:00 committed by GitHub
commit 4604d687f1

View File

@ -23,15 +23,17 @@ angular.module('OpenSlidesApp.mediafiles.projector', ['OpenSlidesApp.mediafiles'
// Allow the elements to render properly
setTimeout(function() {
if ($scope.mediafile.is_pdf) {
$scope.pdfName = mediafile.title;
$scope.pdfUrl = mediafile.mediafileUrl;
} else if ($scope.mediafile.is_video) {
var player = angular.element.find('#video-player')[0];
if ($scope.element.playing) {
player.play();
} else {
player.pause();
if ($scope.mediafile) {
if ($scope.mediafile.is_pdf) {
$scope.pdfName = mediafile.title;
$scope.pdfUrl = mediafile.mediafileUrl;
} else if ($scope.mediafile.is_video) {
var player = angular.element.find('#video-player')[0];
if ($scope.element.playing) {
player.play();
} else {
player.pause();
}
}
}
}, 0);