Skip to content

Commit

Permalink
Black screen when using player #202
Browse files Browse the repository at this point in the history
  • Loading branch information
dularion committed Aug 1, 2016
1 parent 1787028 commit 6a50dab
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -39,7 +39,7 @@ angular.module('streama').factory('playerService',
setVideoOptions: function (video) {
videoOptions = angular.copy(defaultVideoOptions);
videoData = video;
videoOptions.videoSrc = $sce.trustAsResourceUrl(video.files[0].src);
videoOptions.videoSrc = $sce.trustAsResourceUrl(video.files[0].src || video.files[0].externalLink);
videoOptions.videoType = video.files[0].contentType;

if(video.subtitles && video.subtitles.length){
Expand Down Expand Up @@ -205,7 +205,7 @@ angular.module('streama').factory('playerService',
var externalLink = video.files[0].externalLink;
var basePath = location.origin + contextPath;

if(videoSource.indexOf(basePath) == -1 && !externalLink){
if(videoSource && videoSource.indexOf(basePath) == -1 && !externalLink){
hasError = true;
alertify.alert($filter('translate')('MESSAGES.WRONG_BASEPATH', {basePath: basePath}), function () {
if(_.find($rootScope.currentUser.authorities, {authority: "ROLE_ADMIN"})){
Expand Down

0 comments on commit 6a50dab

Please sign in to comment.