-
Notifications
You must be signed in to change notification settings - Fork 651
[Android] Support third part media player on Crosswalk #3736
base: master
Are you sure you want to change the base?
Conversation
Testing patch series with fujunwei/crosswalk@024bae0 as its head.
|
@@ -862,6 +862,13 @@ public void setResourceClient(XWalkResourceClientInternal client) { | |||
mContent.setResourceClient(client); | |||
} | |||
|
|||
@XWalkAPI(reservable = true) | |||
public void setExMediaPlayer(XWalkExMediaPlayerInternal mediaPlayer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the comment for this API?
Thanks @wuhengzhi Those proposals will be modified one by one. |
@@ -9,11 +9,13 @@ | |||
import android.media.MediaPlayer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it?
One thing, I'm still confused by the name |
024bae0
to
9baa6c1
Compare
Testing patch series with fujunwei/crosswalk@9baa6c1 as its head.
|
Changed |
} | ||
|
||
/** | ||
* Sets the data source (FileDescriptor) to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lack of first parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@param fd the FileDescriptor for the file you want to play.
9baa6c1
to
18f4196
Compare
Testing patch series with fujunwei/crosswalk@18f4196 as its head.
|
|
||
/** | ||
* Sets the volume on this player. | ||
* @since 7.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the explanation for parameters.
} | ||
|
||
/** | ||
* Register a callback to be invoked when the end of a media source has been reached during playback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment is too long.
@fujunwei What's the latest status? |
18f4196
to
9f6fdcd
Compare
Testing patch series with fujunwei/crosswalk@9f6fdcd as its head.
|
9f6fdcd
to
354a041
Compare
Testing patch series with fujunwei/crosswalk@354a041 as its head.
|
PTAL. |
354a041
to
1dcd337
Compare
Testing patch series with fujunwei/crosswalk@1dcd337 as its head.
|
A requirement from an important customer who want to forward web resources with proxy on Crosswalk, but android system MediaPlayer can't set a proxy with a standard API. The ExoMediaPlayer is playing videos and music is a popular activity on Android devices, and it can be configured with proxy. https://developer.android.com/guide/topics/media/exoplayer.html BUG=XWALK-6770
Does this support overlaying html content over the video surface just the same as the built-in player? |
Are you going to layout some transparent html content over video?
If you want to implement a transparent html page, you can try this on SurfaceView mode or TextureView mode.
For SurfaceView mode:
1), Enable SurfaceView mode before new XWalkView: No action is required, default is SurfaceView mode;
2), mXWalkView.setZOrderOnTop(true);
3), mXWalkView.setBackgroundColor(Color.TRANSPARENT);
For TextureView mode:
1), Enable TextureView mode before new XWalkView: XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW, true);
2), mXWalkView.setBackgroundColor(Color.TRANSPARENT);
Also, apply transparent theme in AndroidManifest.xml, this will make the whole Activity transparent:
android:theme="@android:style/Theme.Translucent.NoTitleBar"
Regards,
Xing
From: Luke [mailto:[email protected]]
Sent: Monday, February 6, 2017 5:40 AM
To: crosswalk-project/crosswalk <[email protected]>
Cc: Xu, Xing <[email protected]>; Comment <[email protected]>
Subject: Re: [crosswalk-project/crosswalk] [Android] Support third part media player on Crosswalk (#3736)
Does this support overlaying html content over the video surface just the same as the built-in player?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3736 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJ6exkk40uH_Og38Dn4mYqAk4DGmJ2jzks5rZkGhgaJpZM4ItJ3x>.
|
Well I'd like to do both. I want to use a custom video player based on these changes, and I want to be able to overlay html content over the video element as per normal. |
我切换到new_exo_media_player分支并编译成了aar导入我的项目,请问xwalkview.setXWalkMediaPlayer() 这个API该如何使用。我尝试直接new XWalkMediaPlayer()或继承它实现自己的MyMediaPlayer,最终都报NullPointerException异常。导致app崩溃。
报错如下:
|
A requirement from an important customer who want to forward web resources with proxy
on Crosswalk, but android system MediaPlayer can't set a proxy with a standard API.
The ExoMediaPlayer is playing videos and music is a popular activity on Android devices,
and it can be configured with proxy.
https://developer.android.com/guide/topics/media/exoplayer.html
BUG=XWALK-6770