我用动力学画布创建了视频播放器。单击播放按钮后,动力学动画开始,按钮变为暂停。我想在动画完成后再次播放按钮。这是代码:
角度:
$scope.isPreviewPlaying = function(){
return preview != null && preview.isRunning();
}
$scope.playPreview = function(){
.....
preview.stop;
}
$scope.pausePreview = function(){
preview.stop();
}
html:
<button ng-click="playPreview()" ng-show="!isPreviewPlaying()">
<button ng-click="pausePreview()" ng-show="isPreviewPlaying()">