Video control does not pause video


(Mark ) #1

Novice alert :grinning:

I have created a project using a video on every scene. Once video concludes there are elements that appear (text, nav buttons, etc) However in testing we discovered that the built in video controls are not actually pausing the video. After a few seconds the video concludes and the timeline advances without user input.

Does this require custom playback buttons to address? If so, is additional code required to pause timeline to wait for video to conclude? thanks


#2

Hi Mark!

You may find this Forum thread useful (read everything there’s a lot of info there):



(Mark ) #3

Hey Jim
Thanks so much for the link. it looks like the external control of the video is the direction we will have to go. I am curious however, do you know if its common to have the built in player struggle with basic pause/rewind functionality? Thanks again for the response…


#4

Hi Mark!

The built-in player (i.e. the browser’s media player, correct?) works fine in my implementations.

Using “external” controls (Hype scripting) I have found the following scripts useful:

Play~pausing audio (audio file is placed in an off-screen button with an ID of “prologue”):

function playPauseBtnToggle(hypedocument, element, event) {
	var isPlaying = document.getElementById("prologue");		
	(isPlaying.paused) ? isPlaying.play() : isPlaying.pause();
}

**"Rewind" the media = load it again (jQuery):** `$("#prologue").load();`
**Script in a "Close" button's _innerHTML_ for a video ~** Pauses video, then hides the video and the button ("bh_selectedVid" is a pre-assigned variable):
<script> 
function pauseVid() { 
   bh_selectedVid.pause(); 
   bh_selectedVid.hide();
   this.hide();
} 
</script>

#5

Hi Peter!

Also see @MarkHunte 's “Video Controller” thread on this Forum: