Closed HZekriDEV closed 1 week ago
Hi,
Have you put your video within a dummy video and its playing the dummy video instead? Or are you expecting file offset to start your video at a later point?
Thanks for your response!
I'm using a dummy video that is appended at the beginning of the real video. When I play the video, the dummy video is the only thing that plays.
Are you setting the offset by scripting or in the mediaplayer component?
I tried both ways.
Here is the code that I am using to play the video. It could be that I made a mistake in reading the instructions.
using UnityEngine; using RenderHeads.Media.AVProVideo; using System.IO;
public class Play360Video : MonoBehaviour { public MediaPlayer mediaPlayer; public string videoFileName = "Video.mp4"; private string videoPath;
void Start()
{
if(Application.platform == RuntimePlatform.Android)
videoPath = System.IO.Path.Combine(Application.persistentDataPath, videoFileName);
else
videoPath = System.IO.Path.Combine(Application.dataPath, videoFileName);
//Setup
MediaHints hints = mediaPlayer.FallbackMediaHints;
hints.stereoPacking = StereoPacking.TopBottom;
mediaPlayer.FallbackMediaHints = hints;
//Offset
mediaPlayer.PlatformOptionsAndroid.fileOffset = 319044;
// Load the video
mediaPlayer.OpenMedia(MediaPathType.AbsolutePathOrURL, videoPath, autoPlay: true);
}
}
This should be fixed in v3.0.2 (penciled in for release by the end of the week)
AVPro Video version 3.0.2 has been released. Please let us know if it has not fixed your issue.
A new fix for this will be in the next release (v3.0.3).
AVPro Video version 3.0.3 has been released. Please let us know if it has not fixed your issue.
Description When trying to use the "mediaPlayer.PlatformOptionsAndroid.fileOffset" functionality, the player simply plays from the beginning of the video rather than from the offset. This happens despite replicating the instructions given in this page:
https://www.renderheads.com/content/docs/AVProVideo/articles/feature-content-protection-core.html
Setup