B4A Library Video Player with Full Screen Option Native

Alberto Iglesias

Well-Known Member
Licensed User



VideoPlayerFullScreen - Native Video Player with Full Screen Button



VideoPlayerFullScreen
Author:
Alberto Iglesias - alberto@vnsoft.es
Version: 1.0.0


    • Fields:
      • DebugMode As boolean
      Methods:
      • Version As String
      • Author As String
    • VideoPlayerFullScreen
      Events:
      • onInitialized ()
      • onStarting ()
      • onReset ()
      • onState (State as Int)
      Methods:
      • IsInitialized As boolean
      • Initialize (EventName As String)
      • URL (URL As String, Title As String)
      • BackPress As Boolean
      • BringToFront
      • Reset
      • gotoScreenFullscreen
      • gotoScreenNormal
      • DebugMode (bDebug As Boolean)
      • AutoFullScreen (ScreenType As float)
      • Play
      • ThumbnailImage (bm As Bitmap)
      • ReleaseAllVideos
      • RequestFocus As boolean
      Properties:
      • Left As int
      • Background As android.graphics.drawable.Drawable
      • Parent As java.lang.Object [read only]
      • Color As int [write only]
      • Enabled As boolean
      • Top As int
      • State As int [read only]
      • Visible As boolean
      • Height As int
      • Tag As Object
      • Width As int












You can get the library without *DEMO* in our library store:

upload_2019-7-18_0-12-29.png



or just make a simple donation through this button and you will receive the library without *DEMO*



(Do not make any donation before test with the samples attached!)



 

Attachments

Last edited:

Alberto Iglesias

Well-Known Member
Licensed User
On dirassets you can't play, try like this:

First, copy the video to your project

1586692688263.png


and then

B4X:
    If File.Exists(File.DirAssets,"corona.mp4") Then
        File.Copy(File.DirAssets,"corona.mp4",File.DirInternal,"corona.mp4" )
    End If
 
    Dim strVideo As String = File.DirInternal & "/corona.mp4"
  
    VideoPlayerFullScreen1.URL(strVideo,"My Video")
 
Last edited:

josefmowarakawa

New Member
i wanted to play portrait full screen but it couldn help so i found an other way i resize videoin after affect or Wondershare Filmora9 i mean i change the size to portrait instead of 1280*720 i resiza it to 720*1280 it will work perfect any way thank u so much
 
When i click on Full Screen, app is going to close
Error:
Logger connected to:  Xiaomi Redmi 3S
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
[Java][URL]URL:http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
[Java][URL]Title:*DEMO* - Eita Porra
[Java][ThumbnailImage]
** Activity (main) Resume **
[Activity_Resume]
[VideoPlayerFullScreen1_onInitialized]
[Java][EventB4]Event:onState
[Java][EventB4]Parameter:0
[Java][videoplayerfullscreen1_onstate] exist!
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[VideoPlayerFullScreen1_onState]STATE_NORMAL
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][EventB4]Event:onState
[Java][EventB4]Parameter:1
[Java][videoplayerfullscreen1_onstate] exist!
[VideoPlayerFullScreen1_onState]STATE_PREPARING
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][EventB4]Event:onState
[Java][EventB4]Parameter:7
[Java][videoplayerfullscreen1_onstate] exist!
[VideoPlayerFullScreen1_onState]STATE_ERROR
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][EventB4]Event:onState
[Java][EventB4]Parameter:1
[Java][videoplayerfullscreen1_onstate] exist!
[VideoPlayerFullScreen1_onState]STATE_PREPARING
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][ReleaseAllVideos]
[Java][EventB4]onReset
[Java][EventB4]Event:onState
[Java][EventB4]Parameter:0
[Java][videoplayerfullscreen1_onstate] exist!
[VideoPlayerFullScreen1_onState]STATE_NORMAL
[Java][Play]
[Java][EventB4]onStarting
[Java][EventB4]Event:onState
[Java][EventB4]Parameter:1
[Java][videoplayerfullscreen1_onstate] exist!
[VideoPlayerFullScreen1_onState]STATE_PREPARING
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][EventB4]Event:onState
[Java][EventB4]Parameter:7
[Java][videoplayerfullscreen1_onstate] exist!
[VideoPlayerFullScreen1_onState]STATE_ERROR
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][ReleaseAllVideos]
[Java][EventB4]onReset
[Java][EventB4]Event:onState
[Java][EventB4]Parameter:0
[Java][videoplayerfullscreen1_onstate] exist!
[VideoPlayerFullScreen1_onState]STATE_NORMAL
** Activity (main) Pause, UserClosed = false **
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
[Java][DEMO] Remember this is a demo version of this library, please consider to buy me a coffee. Paypal: alberto@vnsoft.es
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
[Activity_Resume]
[VideoPlayerFullScreen1_onInitialized]
[VideoPlayerFullScreen1_onState]STATE_NORMAL
[VideoPlayerFullScreen1_onState]STATE_PREPARING
[VideoPlayerFullScreen1_onState]STATE_PLAYING
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/app/AppCompatActivity;
    at cn.jzvd.JZUtils.getAppCompActivity(JZUtils.java:85)
    at cn.jzvd.JZUtils.getWindow(JZUtils.java:104)
    at cn.jzvd.JZUtils.hideStatusBar(JZUtils.java:164)
    at cn.jzvd.Jzvd.gotoScreenFullscreen(Jzvd.java:747)
    at cn.jzvd.Jzvd.onClick(Jzvd.java:209)
    at cn.jzvd.JzvdStd.onClick(JzvdStd.java:214)
    at android.view.View.performClick(View.java:5215)
    at android.view.View$PerformClick.run(View.java:21196)
    at android.os.Handler.handleCallback(Handler.java:742)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:157)
    at android.app.ActivityThread.main(ActivityThread.java:5601)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.app.AppCompatActivity" on path: DexPathList[[zip file "/data/app/com.visualnet.vpfullsample-2/base.apk"],nativeLibraryDirectories=[/data/app/com.visualnet.vpfullsample-2/lib/arm64, /vendor/lib64, /system/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    ... 15 more
    Suppressed: java.lang.ClassNotFoundException: android.support.v7.app.AppCompatActivity
        at java.lang.Class.classForName(Native Method)
        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
        ... 16 more
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
--------- beginning of crash
 
Top