Skip to content

Commit 04ad20d

Browse files
committed
samples dash-if-reference-player: add "Stop" button to stop/unload current stream
1 parent 9599dab commit 04ad20d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

samples/dash-if-reference-player/app/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,11 @@ app.controller('DashController', function ($scope, sources, contributors, dashif
441441
$scope.controlbar.enable();
442442
};
443443

444+
$scope.doStop = function () {
445+
$scope.player.attachSource(null);
446+
$scope.controlbar.reset();
447+
}
448+
444449
$scope.changeTrackSwitchMode = function (mode, type) {
445450
$scope.player.setTrackSwitchModeFor(type, mode);
446451
};

samples/dash-if-reference-player/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
<input type="text" class="form-control" ng-model="selectedItem.url">
123123
<span class="input-group-btn">
124124
<button class="btn btn-default" ng-click="toggleOptionsGutter(!optionsGutter)" ng-cloak>{{getOptionsButtonLabel()}}</button>
125+
<button class="btn btn-default" type="button" ng-click="doStop()">Stop</button>
125126
<button class="btn btn-primary" type="button" ng-click="doLoad()">Load</button>
126127
</span>
127128
</div>

0 commit comments

Comments
 (0)