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.

Douglas Rhiner

Intermediate

  • "Douglas Rhiner" started this thread

Posts: 137

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

1

Sunday, August 15th 2021, 8:03pm

Windows 360video seek(100%) issue

Got a fun one, I think.

Consider a simple action that fast-forwards a 360video to 100% via .seek(100%)

<action name="gotoend">
callwhen(plugin[videoplayer].loaded,
trace('goto end');
plugin[videoplayer].seek(100%);
);
</action>


Using OS X, under any browser, this fires off seamlessly, the trace traces & the seek seeks to 100%.
Using Windows 10 Pro, under any browser, the trace traces BUT the seek does not seek. It stays at the current position ( beginning / 0% ), with no error being thrown.


Anyone else notice this?

2

Sunday, August 15th 2021, 8:13pm

plugin[videoplayer].loaded does not say the video is ready, only that the plugin was loaded.

i'd try this :

set(plugin[videoplayer].onvideoready,"trace('ready, goto end');plugin[videoplayer].seek(100%);");

Douglas Rhiner

Intermediate

  • "Douglas Rhiner" started this thread

Posts: 137

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

3

Sunday, August 15th 2021, 8:47pm

Sadly to say, I've already gone down that path. More than anything, the plugin[videoplayer].loaded is more of a fault-catch. Plus the action can't be called up-stream until the video is ready, which is what it needs to do, allow the user to get to the last frame of the 360video at-will, once it is ready.

4

Sunday, August 15th 2021, 9:09pm

what do you mean by "the action can't be called up-stream " ?
its logical, that the player cant seek until it has the video ready.
onvideoready is an event, you set it beforehand and it will fire by itself when the video is loaded / ready.

Douglas Rhiner

Intermediate

  • "Douglas Rhiner" started this thread

Posts: 137

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

5

Sunday, August 15th 2021, 11:47pm

I mean the action cant be called until plugin[videoplayer].isvideoready == true, in the logic train. It is just not represented in this example.

What gets me here is that it works just fine on OS X but not on Windows.

6

Monday, August 16th 2021, 9:34am

maybe you should set up an online example...

Douglas Rhiner

Intermediate

  • "Douglas Rhiner" started this thread

Posts: 137

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

7

Monday, August 16th 2021, 8:34pm

Ok, got a test scenario set up:

https://test.xplorit.com/viewer/krpano.h…o/videopano.xml

I have modified the videopano example provided with the viewer.

  • The VR button has been replaced with the Fast-Froward icon.
  • OnClick has been modified to: onclick="plugin[video].seek(100%);"

To check this out, go to the link, and then click the FastForward icon, where the VR icon would normally be in this example.
On Windows you will see that the progress bar advances to the end, but the video stays at the beginning.

I have tried this under OS X and Windows 10 on multiple browsers.

The error still occurs on Windows in all browsers, but behaves as-expected on OS X

*confused*

8

Monday, August 16th 2021, 10:38pm

might be also a question of video formats and codecs...
i'm not a pro here but for my videos i always provide mp4+webm and it matters what settings you use for them.

Douglas Rhiner

Intermediate

  • "Douglas Rhiner" started this thread

Posts: 137

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

9

Monday, August 16th 2021, 11:24pm

All the video we use is mp4 with fairly standard encoding params.

Since the link is a simple mod of the example provided w/KRPano our mp4 encoding is not a factor here, which what I was thinking at first.

10

Tuesday, August 17th 2021, 4:05pm

hmm.. tested and i dont see a difference on firefox mac or windows here

setting 100% triggers the player to immediately jump to 0%, no matter playing or paused.
most likely setting 100% probably works if loop=false and setting 99.9% probably works if not playing

you could do loop=false and onvideoend check if playing, then loop. otherwise not.

This post has been edited 6 times, last edit by "indexofrefraction" (Aug 17th 2021, 5:48pm)