You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

benji33

Intermediate

  • "benji33" started this thread

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

1

Thursday, November 30th 2017, 11:16am

video autoplay

Hi Klaus

Is there a way to test the video autoplay (for video scene and video spots) as this code and have callback results on supported/unsupported states ?

cf. https://sites.google.com/a/chromium.org/…-video/autoplay

Source code

1
2
3
4
5
6
7
8
9
var promise = document.querySelector('video').play();
if (promise !== undefined) {
  promise.then(_ => {
    // Autoplay started!
  }).catch(error => {
    // Autoplay was prevented.
    // Show a "Play" button so that user can start playback.
  });
}


onneedtouch/ongottouch/needtouch seems usable for mobile devices but not for desktop.

This post has been edited 1 times, last edit by "benji33" (Nov 30th 2017, 11:43am)


2

Thursday, April 12th 2018, 10:47pm

bumping this...
i also get promise errors on local use if i autostart videos without hotspot click
is there any way to catch this?

3

Saturday, April 14th 2018, 10:41am

by the way...

are promise errors related
to videoplayer.needtouch or
to http-equiv="Content-Security-Policy"
or is both possible?

benji33

Intermediate

  • "benji33" started this thread

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

4

Tuesday, May 15th 2018, 10:02am

Some news on that with Safari 11 & Chrome 66 autoplay policies on desktop ?