[TIMOB-25990] Android apps crash when trying to add views to Titanium.Media.VideoPlayer objects if fullscreen property is set to true.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-07-26T23:50:27.000+0000 |
Affected Version/s | Release 7.1.0 |
Fix Version/s | Release 7.3.0, Release 7.2.1 |
Components | Android |
Labels | Android, VideoPlayer |
Reporter | Aminul Islam |
Assignee | Gary Mathews |
Created | 2018-04-25T18:42:18.000+0000 |
Updated | 2018-07-26T23:50:34.000+0000 |
Description
Android apps crash when trying to add views to Titanium.Media.VideoPlayer objects if fullscreen property is set to true. The sample code in the documentation exhibits the crash (see snippet under Android Fullscreen Video Player here, https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Media.VideoPlayer).
See attached for example project. When the block that adds the closeButton is removed there is no crash.
[INFO] : APSAnalyticsService: Stopping Analytics Service
[WARN] : MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider: http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
[INFO] : MediaPlayer: It's not a proxy project.
[ERROR] : TiApplication: (main) [109667,109667] Sending event: exception on thread: main msg:java.lang.ClassCastException: ti.modules.titanium.media.TiVideoActivity cannot be cast to org.appcelerator.titanium.TiBaseActivity; Titanium 7.1.0,2018/03/14 13:40,undefined
[ERROR] : TiApplication: java.lang.ClassCastException: ti.modules.titanium.media.TiVideoActivity cannot be cast to org.appcelerator.titanium.TiBaseActivity
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:562)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:549)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:593)
[ERROR] : TiApplication: at ti.modules.titanium.media.VideoPlayerProxy.setVideoViewFromActivity(VideoPlayerProxy.java:136)
[ERROR] : TiApplication: at ti.modules.titanium.media.VideoPlayerProxy.access$200(VideoPlayerProxy.java:51)
[ERROR] : TiApplication: at ti.modules.titanium.media.VideoPlayerProxy$1.handleMessage(VideoPlayerProxy.java:224)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:168)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5885)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
Environment:
Operating System
Name = Microsoft Windows 10 Pro
Version = 10.0.16299
Architecture = 32bit
# CPUs = 4
Memory = 17091956736
Node.js
Node.js Version = 8.9.1
npm Version = 5.5.1
Titanium CLI
CLI Version = 5.0.14
Titanium SDK
SDK Version = 7.1.0.GA
Attachments
File | Date | Size |
---|---|---|
test-android-fullscreen.zip | 2018-04-25T18:44:26.000+0000 | 5542361 |
master: https://github.com/appcelerator/titanium_mobile/pull/10048
FR Passed, Waiting on Jenkins build to merge.
Closing ticket. Fix can be seen in SDK Version: 7.3.0.v20180607210411 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10048