Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

[Android]Handheld.PlayFullScreenMovie not working

Discussion in 'Scripting' started by Kiupe, Jun 29, 2018.

  1. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    528
    Hello guys,

    I'm trying to play a video which is located in an StreamingAssets folder. After extracting .apk I were able to confirm that the video is correctly packed inside it.

    The code to launch the video is quite simple but does not work :

    Code (CSharp):
    1.  
    2. string systemPath = "jar:file://" + Application.dataPath + "!/assets/" + path;
    3.             Handheld.PlayFullScreenMovie(systemPath,backgroundColorMode,fullScreenMovieControlMode,fullScreenMovieScalingMode);
    4.  
    Any idea why ?

    Thanks
     
  2. Alexander21

    Alexander21

    Joined:
    Dec 14, 2015
    Posts:
    220
    I think there is wrong in ur syntax, use this below coding.
    Code (csharp):
    1.  
    2.   Handheld.PlayFullScreenMovie("yourvideonameinstreamingassets.mp4", Color.black);
    3.  
    the above code is tested and working in my apk.