Unable to hide video on Chrome

Workarounds and usability notes.

Unable to hide video on Chrome

Postby John Robin Dove » Thu Jun 07, 2018 9:06 am

Hi Clifton,

This is not vital but I would prefer not to let the student see the first frame of the video before it starts. If I hide the TB field it makes no difference. On Firefox I can achieve what I want by placing an object on top of the video field but on Chrome even this fails to hide it. I've tried changing object layers but that doesn't work either.

John
John Robin Dove
 
Posts: 486
Joined: Thu Jan 23, 2014 4:35 am

Re: Unable to hide video on Chrome

Postby Clifton » Thu Jun 07, 2018 10:56 am

I tried a sample using the PowerPac htmlVideoLoader() and hiding the video worked fine until the video reached a designated playhead position.
Example:
  1. Created new empty PowerPac-enabled book with default export options.
  2. Drew a field and name it "VideoPlayer"
  3. On load page … I set these actions for the field "VideoPlayer":
      Image 1.png
      On load page for field "VideoPlayer"
      Image 1.png (16 KiB) Viewed 1198 times

  4. Created a user event to show the "VideoPlayer" after 5000ms:
      Image 2.png
      On User event actions.
      Image 2.png (2 KiB) Viewed 1198 times

  5. Added an mp4 called waterdrop.mp4 to the media folder using the DHTML Export utility.
  6. Exported file and ran it using the PowerPac server and it played as expected in all browsers. The field "VideoPlayer" was hidden until the video got to 5000ms and then it was shown for the remaining time. The only anomaly was that the controls were visible as the video played during the first 5 seconds, but that is not unusual as the controls are not actually embedded in the field.
If you are using a different video player, maybe that is a factor?
 
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Unable to hide video on Chrome

Postby John Robin Dove » Thu Jun 07, 2018 12:33 pm

No, I'm using the Powerpac htmlVideoLoader. I do not show the control's as I have my own. I load the video and prepare other aspects of the exercise according to the configuration chosen by the teacher. The video does not start until the user clicks on a play button. As I said, I hide the video with a field until it starts playing and this works with Firefox but strangely not with Chrome. I'll try again tomorrow.
John Robin Dove
 
Posts: 486
Joined: Thu Jan 23, 2014 4:35 am

Re: Unable to hide video on Chrome

Postby Clifton » Thu Jun 07, 2018 1:24 pm

You shouldn't need a field to cover the video. Just hide the field that acts as the container. That is all I did in my experiment. I also tried this with or without controls.

If you still have trouble, maybe post an example that fails for you and we can take look.

An alternative to hiding the field is to set the opacity of the field to 1 using setOpacity(). This makes the video visible to the page, but basically invisible to the user. Then at 1000ms, or whatever time frame you choose, set the opacity of the container field back to 100, which removes the opacity filter and makes it fully visible.
 
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Unable to hide video on Chrome

Postby Lobdell » Thu Aug 23, 2018 9:04 am

The opacity workaround is quite neat. I had no idea you could do that. Is there possible to make it apply automatically every time somehow?
These energy drinks are the real deal so check them out.
Lobdell
 
Posts: 1
Joined: Thu Aug 16, 2018 4:53 am

Re: Unable to hide video on Chrome

Postby Nadene » Fri Nov 23, 2018 6:58 am

Clifton wrote:I tried a sample using the PowerPac htmlVideoLoader() and hiding the video worked fine until the video reached a designated playhead position.
Example:
  1. Created new empty PowerPac-enabled book with default export options.
  2. Drew a field and name it "VideoPlayer"
  3. On load page … I set these actions for the field "VideoPlayer":
      Image 1.png

  4. Created a user event to show the "VideoPlayer" after 5000ms:
      Image 2.png

  5. Added an mp4 called waterdrop.mp4 to the media folder using the DHTML Export utility.
  6. Exported file and ran it using the PowerPac server and it played as expected in all browsers. The field "VideoPlayer" was hidden until the video got to 5000ms and then it was shown for the remaining time. The only anomaly was that the controls were visible as the video played during the first 5 seconds, but that is not unusual as the controls are not actually embedded in the field.
If you are using a different video player, maybe that is a factor?
 


Thank you for this answer, I had the same problem!
Nadene
 
Posts: 1
Joined: Fri Nov 23, 2018 4:41 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron