@@ -68,6 +68,18 @@ function DetailController($scope, $rootScope, $state, $q, $modal, $timeout, $sta
68
68
} ) ;
69
69
} ;
70
70
71
+ $scope . openPlayer = function openPlayer ( media ) {
72
+ $modal . open ( {
73
+ template : require ( '../media/templates/media-modal.html' ) ,
74
+ controller : 'MediaController' ,
75
+ resolve : {
76
+ media : function ( ) {
77
+ return media ;
78
+ }
79
+ }
80
+ } ) ;
81
+ } ;
82
+
71
83
// function switchInterestsNodes() {
72
84
// if (document.querySelector('.main-infos .interests') && window.matchMedia("(min-width: 769px)").matches) {
73
85
// document.querySelector('.detail-map').appendChild(document.querySelector('.main-infos .interests'));
@@ -438,6 +450,7 @@ function DetailController($scope, $rootScope, $state, $q, $modal, $timeout, $sta
438
450
439
451
getInterests ( result , forceRefresh ) ;
440
452
$rootScope . $emit ( 'initGallery' , result . properties . pictures ) ;
453
+ $rootScope . $emit ( 'initMedia' , result . properties . videos ) ;
441
454
$scope . result . informations = detailService . hasInfos ( result . properties , 'duration_pretty' , 'duration' , 'difficulty.label' , 'levels' , 'route' , 'ascent' , 'depth' , 'networks' , 'target_audience' ) ;
442
455
$rootScope . $emit ( 'detailUpdated' , forceRefresh ) ;
443
456
} ,
@@ -473,6 +486,7 @@ function DetailController($scope, $rootScope, $state, $q, $modal, $timeout, $sta
473
486
474
487
}
475
488
489
+
476
490
module . exports = {
477
491
DetailController : DetailController
478
492
} ;
0 commit comments