Commit 6f91ee2bf35fa38519da943e4734b9dec722e536

Authored by Birendra
1 parent 75a871ed

Fix firefox and ie issue for animation video

400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
@@ -1123,10 +1123,13 @@ function videoOnLoad(event) { @@ -1123,10 +1123,13 @@ function videoOnLoad(event) {
1123 var scope = angular.element(document.getElementById("CAView")).scope(); 1123 var scope = angular.element(document.getElementById("CAView")).scope();
1124 // var len = (event.target.id).split("_").length; 1124 // var len = (event.target.id).split("_").length;
1125 var windowviewid = (event.target.id).split("_")[1]; 1125 var windowviewid = (event.target.id).split("_")[1];
1126 -  
1127 - scope.$apply(function () {  
1128 - scope.videoOnLoad(windowviewid);  
1129 - }); 1126 + setTimeout(function()
  1127 + {
  1128 + scope.$apply(function () {
  1129 + scope.videoOnLoad(windowviewid);
  1130 + });
  1131 + }, 500);
  1132 +
1130 } 1133 }
1131 1134
1132 function GetTextVisibityCA(event) { 1135 function GetTextVisibityCA(event) {
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js
@@ -303,7 +303,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -303,7 +303,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
303 parentSlug: $scope.GetVideowindowStoreData(windowviewid, 'parentSlugName'), 303 parentSlug: $scope.GetVideowindowStoreData(windowviewid, 'parentSlugName'),
304 content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();});</script>' + 304 content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();});</script>' +
305 '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="400"' + 305 '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="400"' +
306 - 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo_' + windowviewid + '" onloadstart="videoOnLoad(event)"' + 306 + 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo_' + windowviewid + '" onloadstart="MyvideoOnLoad(event)"' +
307 // ' poster="' + poster + '"' + 307 // ' poster="' + poster + '"' +
308 'controls="true" preload="none" allowfullscreen="true" allowscriptaccess="always" ' + 308 'controls="true" preload="none" allowfullscreen="true" allowscriptaccess="always" ' +
309 // ' ad="' + admp4 + '"' + 309 // ' ad="' + admp4 + '"' +
@@ -386,7 +386,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -386,7 +386,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
386 $scope.PanelActivity(); 386 $scope.PanelActivity();
387 } 387 }
388 388
389 - $scope.videoOnLoad = function (windowviewid) 389 + $scope.MyvideoOnLoad = function (windowviewid)
390 { 390 {
391 $scope.EnableUI(); 391 $scope.EnableUI();
392 if ($rootScope.isCallFromOtherModule) { 392 if ($rootScope.isCallFromOtherModule) {
@@ -411,14 +411,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -411,14 +411,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
411 411
412 }]); 412 }]);
413 413
414 - function videoOnLoad(event) { 414 + function MyvideoOnLoad(event) {
415 415
416 console.log('video loaded') 416 console.log('video loaded')
417 var scope = angular.element(document.getElementById("VideoView")).scope(); 417 var scope = angular.element(document.getElementById("VideoView")).scope();
418 // var len = (event.target.id).split("_").length; 418 // var len = (event.target.id).split("_").length;
419 var windowviewid = (event.target.id).split("_")[1]; 419 var windowviewid = (event.target.id).split("_")[1];
420 -  
421 - scope.$apply(function () {  
422 - scope.videoOnLoad(windowviewid);  
423 - }); 420 + setTimeout(function()
  421 + {
  422 + scope.$apply(function () {
  423 + scope.MyvideoOnLoad(windowviewid);
  424 + });
  425 + }, 500);
  426 +
424 } 427 }
425 \ No newline at end of file 428 \ No newline at end of file