android


Android: Implement floating video player (like YouTube android app) with JW Player SDK


I am trying to implement Floating video player (like YouTube player which minimize when dragged to bottom right of the screen). For that I am using DraggablePanel library (https://github.com/pedrovgs/DraggablePanel).
I was having some problem while integrating it with our production code so I try to integrate it with JW player sample app
(the VideoPlayer that we are using in our app is JW player). JW player sample app is on GitHub: https://github.com/jwplayer/jwplayer-sdk-android-demo
I changed only the xml layout. But its not working as expected.
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="#+id/output2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#color/ccl_blue" />
<com.github.pedrovgs.DraggableView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:draggable_view="http://schemas.android.com/apk/res-auto"
android:id="#+id/draggable_view_my"
android:layout_width="match_parent"
android:layout_height="match_parent"
draggable_view:bottom_view_id="#+id/output"
draggable_view:top_view_id="#+id/linearlayout" //if i give id of JWPlayerView, then app crashes. So i wrapped it inside a LinearLayout
draggable_view:top_view_margin_right="1dp"
draggable_view:top_view_resize="true"
draggable_view:top_view_x_scale_factor="2.5"
draggable_view:top_view_y_scale_factor="1.5"
draggable_view:enable_click_to_maximize_view="false"
draggable_view:enable_click_to_minimize_view="false"> //this is not working. Player is getting minimised if i click on it
<LinearLayout
android:id="#+id/linearlayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/gray"
android:orientation="vertical">
<com.longtailvideo.jwplayer.JWPlayerView
android:id="#+id/jwplayer"
android:layout_width="match_parent"
android:layout_height="250dp" />
<TextView //this TextView is not coming. Neither in Expanded view nor in minimized view
android:id="#+id/output"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#f01232"
android:text="Bottom Text View" />
</LinearLayout>
</com.github.pedrovgs.DraggableView>
</FrameLayout>
1) The player is getting minimized even when draggable_view:enable_click_to_minimize_view="false". So I am not able to pause the player or click any of the icons which appear
on the player skin. Sometimes I manage to click on the play/pause button in the expanded view mode but it also results in minimizing the player view as well.
2) video frames are not coming most of time when player is minimized. see below photo link. a white screen is coming at the bottom right corner.
https://drive.google.com/open?id=0B6qOdZzDeOniM210aTZxSml2Wlk
3) if I dismissed the minimized player view(by dragging it to left/right), the audio is still coming even though the VideoView is gone.
4) if i click on fullscreen icon on playerview then it goes fullscreen but instead of showing video frames only a white screen is coming.
5) Its really hard to maximize the player. You have to SLOWLY drag upwards the minimized view exactly from the center, otherwise the minimized view goes left or right and gets dismissed.
Is the library incompatible with JW PlayerView? or Is there any other library for the same? If there is no library then how can I achieve this in android?

Related Links

Number of tuples in a SQLite android intern database
Getting null from server when using SignalR in Android
Android instrumented tests cant find a main resource
Android Webview make back button go to previous page
How to send notification to everyone except the initiator in Amazon SNS Topics?
android List<> .size () cause application to crash
Google Play Store API for Application Download & Uninstall Count + Application Rating
Debug application on real device
Google Maps Android Fragments load last markers
Cannot resolve ListView in Adapter class
What is the use of onChildTitleChanged(Activity childActivity, CharSequence title) in android?
Fragment Added in View Pager Load Wrong Data
Add options in an option menu of main toolbar in Android studio
YouTube live streaming API LiveChatMessages
How to remove mms sending warnining in cordova app?
Android code not creating file. No such file or directory found error

Categories

HOME
httparty
apache-flink
pda
mjml
package
jsf-2.2
access
scripting
3d-reconstruction
x264
google-cloud-datalab
vert.x
title
augeas
mod-security
parameter-passing
scsi
chargify
template-engine
google-picker
jmp
database-connection
cgbitmapcontext
named-entity-recognition
expressionengine3
jquery-multiselect
asymptotic-complexity
quantlib
openmdao
event-flow
memory-address
autolisp
login-script
getpixel
installscript
slacktextviewcontroller
openproject
jpad
odroid
trigonometry
android-ibeacon
install.packages
claims
android-exoplayer
apache-spark-dataset
fclose
dtsearch
git-flow
bootstrap-tags-input
rsa-archer-grc
restore
rmongo
pure-css
flex-monkey
seek
burrows-wheeler-transform
scaffolding
vorpal.js
aspen
toast
libvlc
maybe
dllimport
wiredep
rate-limiting
include-guards
android-launcher
telepat
teamcity-9.1
cosine-similarity
iiop
lambda-architecture
mintty
draw2d-js
menubar
ora-06550
mt4j
oocss
cocoalibspotify-2.0
dolby-audio-api
asplinkbutton
qi4j
vfs
garbage
objectquery
denied
saxparseexception
htdocs
lr
twitterizer
mtu
facebook-iframe
maven-1
zend-rest
cfwindow
spread
django-piston
build-environment
technical-debt

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App