htmlVideoControl() and Pause/Play button

Confirmed or possible bug reports and workarounds

htmlVideoControl() and Pause/Play button

Postby Kataleena » Mon Jun 15, 2015 9:33 pm

Hi,

I need urgent help, I have created a pause/play button, that I have used in many of my applications, and I think since I have updated Powerpac at some stage it has stopped working.

Th four Execute scripts:
1. check if video "isPaused"
2. get "currentTime"
3. set video to "pause"
4. set "currentTime"
5. set video to "play"

Set "currentTime" to
Pause.jpg
Pause.jpg (194.37 KiB) Viewed 4654 times


It works when you hit the button once to pause then hit again to play, but when you hit the pause button a second time, the "currentTime" is not being set. The video then stutters and wont play or gets stuck in a 1 second loop.

**Update** looks like the setting of the "currentTime" is not working at all, on the first use of the button it pauses then plays from the same position rather then - 5 secs from current position, then on second use the video then stutters and wont play or gets stuck in a 1 second loop.

Any help please????
Kataleena
 
Posts: 49
Joined: Sun Feb 23, 2014 10:05 pm

Re: htmlVideoControl() and Pause/Play button

Postby Clifton » Wed Jun 17, 2015 11:18 am

I will try and build a test case of this as soon as possible. Unfortunately, I am away for a few days.

Please let me know the ToolBook version and if you can send a one page example which demonstrates the problem this would make this easier and faster to diagnose.

Sorry.

**************************************
UPDATE:
Also please make sure you are using the latest PowerPac release ... should be v12.511 or greater.
Also, you should put in some prompts after each htmlVideoControl() execution to see what the value of your return from the function is. This may help you figure out why the button works the first time, but not on subsequent attempts. Also, getting and setting currentTime generally works best with a video that is playing.
If you continue to have problems, it may be good to know if the video is using the Flash fallback or HTML 5 video mechanism to play the video.

Finally, the most expedient way for me to troubleshoot this is to send the actual page with the video that is involved.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: htmlVideoControl() and Pause/Play button

Postby Kataleena » Wed Jun 17, 2015 9:00 pm

Hi,

I ran out of time so I stripped the code for setting the current time back 5 sec and now my button just pause/plays from current time and it is working but I would love to get the old method working for the next update so I can put it back in.

Once I have finished handing over current project I will get you a sample page with video but below is what I already know.

I'm using TB 10.5

I am using latest PowerPac release v12.511, I also uninstalled it and reinstalled.

By putting prompts in is how I knew the "currentTime" was not working at all.

The first loop of hitting of the button, the return for htmlVideoControl() set "currentTime" to VideoPosSet was returning the current time rather then VideoPosSet time and the video played from where it was paused.

The Second loop of hitting of the button, the return for htmlVideoControl() set "currentTime" to VideoPosSet was returning nothing and the video then stutters and wont play or gets stuck in a 1 second loop

How do I tell if the video is using the Flash fallback or HTML 5 video mechanism to play the video?

Thanks and I will get a sample to you as soon as possible.
Kataleena
 
Posts: 49
Joined: Sun Feb 23, 2014 10:05 pm

Re: htmlVideoControl() and Pause/Play button

Postby Clifton » Sun Jun 21, 2015 12:33 am

After some research, it seems that the problem is related to the new range slider plugin that has been included with recent releases of the PowerPac. The new plugin required some special handling of video control calls with htmlVideoControl(). However, this appears to have caused some problems when multiple calls to htmlVideoControl() are used sequentially in the same Action Editor sequence.

We've fixed the bugs related to this and have uploaded a new production release of the PowerPac v12.518.

Here is the working page showing exactly the sequence of actions you were trying to implement.
http://www.pgsoftwaretools.com/powerpac/assessments/htmlVideo_play_pause

Your previous action code should work now.

    Here is what my code looks like for the play/pause button:
    Image 1.png
    Play/Pause Button Action Sequence
    Image 1.png (10.04 KiB) Viewed 4640 times

    Notice that it is very similar to yours. A couple of lines may have been optimized
    or modified for debugging purposes, but your action sequence was fine.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 4 guests

cron