Media Player SEEK note doesn't work sometimes on 4.14

Hi everyone
somehow my seek notes don’t work sometimes when I test my app on my Samsung S3.
In my projet I switch from video A to video B. Video B should begin play in the same time as video A is when I switch between them.
In the editor everything works but on android sometimes the video starts at the beginning. But it is totally random, I can’t reproduce this.
Between the media player commands I have set a delay.
Does anybody have a clue what I am doing wrong?

Greetings
Evil_Fischi

I’d recommend pausing the video, get the seek position, switch track, set seek position, play.

Hi [MENTION=11153]Chris Babcock[/MENTION],

thank you for your tip. I forgot to pause the mediaPlayer.
This helped me but somehow the mediaPlayer still starts sometimes at 0:00.

Here is what I am doing:

  1. I pause the Mediaplayer
  2. Delay with a duration of 0.3 Seconds
  3. Call a function in which I save the playback time of the video in an variable and do a open source of the mediaPlayer
  4. Delay a second time my exec
  5. Call an other function in which I seek to the time I saved in the first function and set a bool to true.
  6. In my eventgraph of the blueprint i check in everyframe if the bool and the mediaPlayer is ready. If it is so I set the bool to false, delay a third time with 0.2 seconds and set the mediaPlayer to play.

I do some other stuff between this all, but I don’t think they have any effect on the media stuff.
When I try it in the Editor everything works, but when I launch it to my smartphone it doesn’t work everytime…
So my question now is: Am I doing something wrong here? Do I just have to increase the delays? Or is it somehow that my smartphone is not capable of working with four videos?
Or is there a smoother workaround to this problem?

Cheers,
Evil_Fischi

Since the calls go straight through to the native Android media player it may be an issue with the media player. Which device are you seeing this on? Do you have another Android device to try it on?

I am using a Samsung s3 neo, but I will try to convince one of my collegues to lend me one of their device :slight_smile:
I’ll keep you updated :wink:

I have set up a new project to test the seek node on my phone.
I have set up a blueprint in which I switch between four videos when I step up onto a collision box


What I have found out:
With four videos it seems to be relative unstable. The video resets randomly.
When I just use three different videos are quite stable. I only get one or two resets of the videos.
if I uncheck the precache file box in the FileMediaSource the seek command is more reliable that when you check it.

Is there a way to monitor the memoryusage of my smartphone?

EDIT:
I have increased the delay to .5 seconds each and I got no resets at all, when I had four videos.

UPDATE:
I have made my blueprints less complicated and now it works, but I don’t know where my mistake was… :confused:

But now it does not run in the editor. Now the video starts there in the beginning and not in the correct time…

You can get some memory stats with “adb shell cat /proc/meminfo”.

Good that it works on device. The editor movie player needs to wait for prepare to finish.