[Dev] Media play state callback is not called. - MX Player

I want to use RemoteController or MediaController to listen MX play state (play / pause/ seek), but it doesn't work.
Code:
AudioManager.registerRemoteController() to callback RemoteController.OnClientUpdateListener.onClientPlaybackStateUpdate().
MediaController.registerCallback() to callback MediaController.Callback.onPlaybackStateChanged().
I think something is wrong in MX player, it works on Youtube app.

Related

[APP] Swaytify for Spotify ®

With Swaytify App you can watch music videos directly from Spotify®, Dezeer or Wimp App.
How to use:
1. Launch Spotify®, Deezer or Wimp App
2. Navigate to the song you want to play
3. Select Share
4. Select 'Add to Swaytify'
5. Enjoy watching the music video from YouTube and read lyrics
This app required running version 4.2.16 or later of the Google YouTube app.
Tested with:
Spotify®
Deezer
Wimp
Shazam®
Play Store

CDN-FastServer streams are not working on firestick with mx player

Any chance of getting cdn-FastServer streams to work in mx player
They work fine in vlc & yesplayer
When playing a video from a cdn-FastServer on my phone mx player can play it but on the firestick it just eventually comes up with unable to play video
However vlc player (and others such as yes player) can play the stream on the firestick without issue
See below post for logs/error report
Any reason why mx player won't play videos from cdn-FastServer
They play perfectly fine with vlc
TheFixItMan said:
Any chance of getting cdn-FastServer streams to work in mx player
They work fine in vlc & yesplayer
Click to expand...
Click to collapse
Could you please explain the issues in detail? It will be great if you can collect a bug report from MX Player help menu immediately after the issue.
NB: Kindly post the issues in a separate thread. Otherwise, It will be very difficult to track us.
Thirumalai.K said:
Could you please explain the issues in detail? It will be great if you can collect a bug report from MX Player help menu immediately after the issue.
NB: Kindly post the issues in a separate thread. Otherwise, It will be very difficult to track us.
Click to expand...
Click to collapse
Here are the error logs (in attachment)
If I play a video that is hosted on a cdn-FastServer on my phone in mx player it plays fine but on my firestick the buffer circle just spins and eventually says cannot play this video
However if I open the same video stream in vlc on my firestick it plays fine meaning its not a firestick limitation but a problem with mx player playing these streams on a firestick
TheFixItMan said:
Here are the error logs (in attachment)
If I play a video that is hosted on a cdn-FastServer on my phone in mx player it plays fine but on my firestick the buffer circle just spins and eventually says cannot play this video
However if I open the same video stream in vlc on my firestick it plays fine meaning its not a firestick limitation but a problem with mx player playing these streams on a firestick
Click to expand...
Click to collapse
It's strange. According to the logs, HW Decoder which is based on the android mediaplayer API implementation in your firmware has failed to play with unknown error. And FFMpeg has returned with 404 (File not found). Both are completely independent. Need to check whether there is something that is intercepting or blocking the connection of MX Player.
Thirumalai.K said:
It's strange. According to the logs, HW Decoder which is based on the android mediaplayer API implementation in your firmware has failed to play with unknown error. And FFMpeg has returned with 404 (File not found). Both are completely independent. Need to check whether there is something that is intercepting or blocking the connection of MX Player.
Click to expand...
Click to collapse
Any suggestions because like I said - the video plays fine in other players so it's not my Internet connection or anything on the firestick blocking it
MX player can play all other streams except from cdn-FastServer on the firestick
MX player can play cdn-FastServer streams on my phone
So there's something that mx player does differently on the firestick compared to my phone
The firestick is android 5 and my phone is android 7 both using the custom codec
So unless there are missing codecs that are native to android 7 & not 5 or just missing from the firestick I don't know what the difference is
TheFixItMan said:
Any suggestions because like I said - the video plays fine in other players so it's not my Internet connection or anything on the firestick blocking it
MX player can play all other streams except from cdn-FastServer on the firestick
MX player can play cdn-FastServer streams on my phone
So there's something that mx player does differently on the firestick compared to my phone
The firestick is android 5 and my phone is android 7 both using the custom codec
So unless there are missing codecs that are native to android 7 & not 5 or just missing from the firestick I don't know what the difference is
Click to expand...
Click to collapse
are your Mobile and Firestick on the same network?
can you change the MX Player user agent (Check general Settings) to something like your mobile & check again?
FFmpeg should work as long as you are using the right version for your CPU architecture. If your CPU architecture is different, MX Player itself will show the error.
The logs from FFmpeg was clear that it has received 404. But, we couldn't reproduce it any of our devices. We have even directly tried FFmpeg command line version on desktops. It also works. Even if it's an FFmpeg fault, It will affect only HW+ & SW decoders. HW decoder is independent. As we said earlier, it's just a wrapper of android mediaplayer API implementation on your device. So, MX Player does not have many controls. But, It is also having the issues.
It is the clear indication that there is something that is preventing MX from connecting to the CDN. If it possible, can you use any debugging proxies & check the connection logs of yours firestick? In our tests, it receives 302 (Moved Temporarily along with the new URL) and then it connects to redirected URL properly.
If You clearly receives 404, then there might be some server configuration which might be preventing you from connecting to the server.
Thirumalai.K said:
are your Mobile and Firestick on the same network?
can you change the MX Player user agent (Check general Settings) to something like your mobile & check again?
FFmpeg should work as long as you are using the right version for your CPU architecture. If your CPU architecture is different, MX Player itself will show the error.
The logs from FFmpeg was clear that it has received 404. But, we couldn't reproduce it any of our devices. We have even directly tried FFmpeg command line version on desktops. It also works. Even if it's an FFmpeg fault, It will affect only HW+ & SW decoders. HW decoder is independent. As we said earlier, it's just a wrapper of android mediaplayer API implementation on your device. So, MX Player does not have many controls. But, It is also having the issues.
It is the clear indication that there is something that is preventing MX from connecting to the CDN. If it possible, can you use any debugging proxies & check the connection logs of yours firestick? In our tests, it receives 302 (Moved Temporarily along with the new URL) and then it connects to redirected URL properly.
If You clearly receives 404, then there might be some server configuration which might be preventing you from connecting to the server.
Click to expand...
Click to collapse
Both firestick & phone are on same network
Both have exactly same settings in mx player
Both are arm v7 neon
It doesn't explain why other players can play the cdn link on the firestick but mx player can't
Surely if something was blocking the link it would block it across all players unless it was an app specific block & I have set up no such block of apps either individually or globally
Equally if there was a server configuration block I don't see why they would block mx player connecting & not other players on a firestick especially as it works on a phone
I don't know if this would help but Iv attached the log of vlc whilst playing the stream on the firestick
TheFixItMan said:
Both firestick & phone are on same network
Both have exactly same settings in mx player
Both are arm v7 neon
It doesn't explain why other players can play the cdn link on the firestick but mx player can't
Surely if something was blocking the link it would block it across all players unless it was an app specific block & I have set up no such block of apps either individually or globally
Equally if there was a server configuration block I don't see why they would block mx player connecting & not other players on a firestick especially as it works on a phone
I don't know if this would help but Iv attached the log of vlc whilst playing the stream on the firestick
Click to expand...
Click to collapse
There are plenty of ways, a server could block a particular device or app.
Have you tried after changing the User Agent on MX Player to something like in your mobile or something generic like MXPlayer/1.9.24 ?
Unlike others, MX Player generates a unique user agent for every device model based on its build properties. If the CDN's redirect conditions block the particular UA string, then it could happen. As it works everywhere except Firestick, it could be a possible reason.
Thirumalai.K said:
There are plenty of ways, a server could block a particular device or app.
Have you tried after changing the User Agent on MX Player to something like in your mobile or something generic like MXPlayer/1.9.24 ?
Unlike others, MX Player generates a unique user agent for every device model based on its build properties. If the CDN's redirect conditions block the particular UA string, then it could happen. As it works everywhere except Firestick, it could be a possible reason.
Click to expand...
Click to collapse
Yes Iv changed it & it made no difference
Apart from the Android version & the build name they both use mozilla 5.0
I changed it to the generic string but it made no difference
Guess I'll just to use vlc for these streams
TheFixItMan said:
Yes Iv changed it & it made no difference
Apart from the Android version & the build name they both use mozilla 5.0
I changed it to the generic string but it made no difference
Guess I'll just to use vlc for these streams
Click to expand...
Click to collapse
Can you collect the network data using a debugging proxy? It will help us to understand better.
Thirumalai.K said:
Can you collect the network data using a debugging proxy? It will help us to understand better.
Click to expand...
Click to collapse
Not sure if this exactly what you wanted as I can only use apps which I find (no pc)
Iv captured the packets whilst playing the stream in mx player & vlc
You can see that vlc redirects to a different server where as mx player fails to redirect & says file not found
TheFixItMan said:
Not sure if this exactly what you wanted as I can only use apps which I find (no pc)
Iv captured the packets whilst playing the stream in mx player & vlc
You can see that vlc redirects to a different server where as mx player fails to redirect & says file not found
Click to expand...
Click to collapse
Thanks for your efforts.
In fact, MX has tried the redirected URL. It looks like a server side restriction as we have expected.
If you look at the #1 of MX & VLC get requests, both MX & VLC has sent a GET request for the same URL.
Code:
GET: /storage_movie/1/194057/cdn2_vidcdn_pro/movie/hoaphuong/Thang%206/1.6/Watch%20World%20of%20Dance%20-%20Season%202%20For%20Free%20On%20yesmovies.to.mp4
HOST: cdn.vidnode.net
If you look at the Server Reply, Both has returned with 302 (i.e redirection). But with the different target location
For VLC, the server has returned with a valid video URL which is same as what we are receiving on our mobiles.
Code:
Location: https://video.xx.fbcdn.net/v/t42.9040-2/10000000_403505290165887_8647744692890370048_n.mp4?_nc_cat=0&efg=eyJybHIiOjIwMDUsInJsYSI6NDA5NiwidmVuY29kZV90YWciOiJzdmVfaGQifQ%3D%3D&rl=2005&vabr=1337&oh=70cdf02f8b7a517206ca3be7918d6a2e&oe=5B18F57C
But, For MX, the server has returned with a URL which does not exist.
Code:
Location: http://cdn16.micetop.us/cdn2_vidcdn_pro/movie/hoaphuong/Thang 6/1.6/Watch World of Dance - Season 2 For Free On yesmovies.to.mp4
Then both VLC & MX has tried whatever URL it has received. As VLC has received a valid URL, it has played the file. But, MX has received an invalid URL. So, it has failed to play.
Can you provide the actual source of the URLs?
MX Player API allows passing any HTTP headers which are required for the connection. The application which calls MX through intents sends the referer as "https://vidnode.net/". When MX Passes the received referer on the GET request, the server returns with the invalid redirection URL. If there is no referer is passed on the headers, server properly returns the valid URL.
So, there might be some configs on the server which decides the redirection URL based on the Referer. We are not sure whether it's intentional or mistake.
So, it is something that has to be fixed on the app which calls MX Player or on the server end. We can't drop the HTTP referer on the GET requests as it will break the apps that genuinely rely on it.
You can confirm this by directly inputting the URL on the MX Player's network stream option.
Code:
http://cdn.vidnode.net/storage_movie/1/194057/cdn2_vidcdn_pro/movie/hoaphuong/Thang%206/1.6/Watch%20World%20of%20Dance%20-%20Season%202%20For%20Free%20On%20yesmovies.to.mp4
If this works, Kindly contact the app developer of the parent app which is calling the MX.
Thirumalai.K said:
Thanks for your efforts.
In fact, MX has tried the redirected URL. It looks like a server side restriction as we have expected.
If you look at the #1 of MX & VLC get requests, both MX & VLC has sent a GET request for the same URL.
Code:
GET: /storage_movie/1/194057/cdn2_vidcdn_pro/movie/hoaphuong/Thang%206/1.6/Watch%20World%20of%20Dance%20-%20Season%202%20For%20Free%20On%20yesmovies.to.mp4
HOST: cdn.vidnode.net
If you look at the Server Reply, Both has returned with 302 (i.e redirection). But with the different target location
For VLC, the server has returned with a valid video URL which is same as what we are receiving on our mobiles.
Code:
Location: https://video.xx.fbcdn.net/v/t42.9040-2/10000000_403505290165887_8647744692890370048_n.mp4?_nc_cat=0&efg=eyJybHIiOjIwMDUsInJsYSI6NDA5NiwidmVuY29kZV90YWciOiJzdmVfaGQifQ%3D%3D&rl=2005&vabr=1337&oh=70cdf02f8b7a517206ca3be7918d6a2e&oe=5B18F57C
But, For MX, the server has returned with a URL which does not exist.
Code:
Location: http://cdn16.micetop.us/cdn2_vidcdn_pro/movie/hoaphuong/Thang 6/1.6/Watch World of Dance - Season 2 For Free On yesmovies.to.mp4
Then both VLC & MX has tried whatever URL it has received. As VLC has received a valid URL, it has played the file. But, MX has received an invalid URL. So, it has failed to play.
Can you provide the actual source of the URLs?
MX Player API allows passing any HTTP headers which are required for the connection. The application which calls MX through intents sends the referer as "https://vidnode.net/". When MX Passes the received referer on the GET request, the server returns with the invalid redirection URL. If there is no referer is passed on the headers, server properly returns the valid URL.
So, there might be some configs on the server which decides the redirection URL based on the Referer. We are not sure whether it's intentional or mistake.
So, it is something that has to be fixed on the app which calls MX Player or on the server end. We can't drop the HTTP referer on the GET requests as it will break the apps that genuinely rely on it.
You can confirm this by directly inputting the URL on the MX Player's network stream option.
Code:
http://cdn.vidnode.net/storage_movie/1/194057/cdn2_vidcdn_pro/movie/hoaphuong/Thang%206/1.6/Watch%20World%20of%20Dance%20-%20Season%202%20For%20Free%20On%20yesmovies.to.mp4
If this works, Kindly contact the app developer of the parent app which is calling the MX.
Click to expand...
Click to collapse
Yes inputting the stream directly into mx player alows it to work
So the app that calls mx player to play the link is doing something to stop it working
It's odd because on my phone that same app which calls mx player allows it to play fine
Thanks for your help
TheFixItMan said:
Yes inputting the stream directly into mx player alows it to work
So the app that calls mx player to play the link is doing something to stop it working
It's odd because on my phone that same app which calls mx player allows it to play fine
Thanks for your help
Click to expand...
Click to collapse
In fact, the calling app sends the full set of http headers to be used (including the user agent string). As the app has requested, It will be used on http connection despite your custom User Agent settings. You could see a Windows UA on the http logs.
As the invalid redirection URL also a media url, it could be even a conflict on server which is triggered when using the referer. So, we are not sure that whether intentionally done or not.
Btw, Can you specify the name of the app?
It will help us to provide a better support for those who has similar issues.
Thirumalai.K said:
In fact, the calling app sends the full set http headers to be used (including the user agent string). As the app has requested, It will be used on http connection despite your custom User Agent settings. You could see a Windows UA on the http logs.
As the invalid redirection URL also a media url, it could be even a conflict on server which is triggered when using the referer. So, we are not sure that whether intentionally done or not.
Btw, Can you specify the name of the app?
It will help us to provide a better support for those who has similar issues.
Click to expand...
Click to collapse
Imagine if there were hardly any planets in the planetarium
Bit cryptic but you should be able to work out the app from that lol as I can't post it here for obvious reasons
Volka IPTV crush
I have a similar issue, my iptv application "Volka Pro2" keeps crushing on amazon Fire stick but not on my Mobile phone. I get an error " error creating player"
Anyone with similar problem who have figured out the solution?
Mndj said:
I have a similar issue, my iptv application "Volka Pro2" keeps crushing on amazon Fire stick but not on my Mobile phone. I get an error " error creating player"
Anyone with similar problem who have figured out the solution?
Click to expand...
Click to collapse
It seems to be an issue with the app. As this subforum is dedicated for MX Player related queries, request you to post your query in an appropriate section for better support.

Default music app behaviour

Hi XDA community,
I have just received a reply to a 'bug report' I submitted.
I queried if the following is normal behaviour on OnePlus devices:
1. Pair phone with Bluetooth headphone/speaker
2. Disable Google Play Music (this is so that I can change the default Music app)
3. Change default Music app (I changed it to Pi Music Player)
4. Open default Music app (Pi Music Player) and play any track
5. Stop track and close the default Music app (Pi Music Player)
6. Open YouTube or any other streaming app and play content
7. Close YouTube
8. Click play/pause button on Bluetooth headphone/speaker
9. This should open your default Music app (Pi Music Player), but it does not.
I received the following reply:
'Good day sir, as we confirmed, this is by default design, In this case, youtube app won't handle any key event if they're in background.
Thanks for your effort and hope you have good day.'
My question is are OnePlus saying that if I use Youtube then the play/pause button on my Bluetooth headphone is disabled on OnePlus devices even though Youtube has been closed, shutdown and not running in the background? If so this sounds to me like default music app setting in OnePlus is not working properly. This is the same even if I restart the phone. The only way to make it work is to open default Music app (Pi Music Player) again and play a track.
On all other devices I use when clicking the play/pause button on my Bluetooth headphone the default music app is automatically started regardless of whether I have previously used Youtube and then closed it.
Any thoughts?
Can someone advise how the 'default music app' setting is supposed to work in OOS? OnePlus have confirmed that it doesn't ensure your Bluetooth headphones to auto start your default music app.
This was the reply:
'Yes sir, it will open the last player app you run and it's current rules. It may not change in a short time.'
Other than selecting 'Auto Play' under 'Earphone mode', is there any way to get round this as it is annoying having to take the phone out of the pocket to open music app.

[App][4.2+] Dreams Tube for Play Tube, Video Tube, Music Tube [Download & background]

[App][4.2+] Dreams Tube for Play Tube, Video Tube, Music Tube [Download & background]
Dreams Tube is a well known modded version of YouTube ?? with many features such upgrade more as download video and background playback, float popup play mode.
DreamsTube is a free and powerful third party client YouTube. This app helps you to easily find movie videos and music videos.
DreamsTube helps you to easily find great videos and free music in all over of the world and your country.
Mark your favorite videos and music, save the playlist of you. Play Tube video easily.
Dowload by play store: https://play.google.com/store/apps/details?id=org.floating.dreamstube
FEATURE:
+ Collect your favorite YouTube videos
+ Search for favorite videos and channels
+ Float Popup play mode
+ Display detail information about the video and music
+ Bookmark your favorite video and music, save your playlist.
+ Subscribe video channels you like
+ Play local video music ?
+ Import youtube song list
Important NOTE:
1. Tube Player : Video Tube, Music Tube, Play Tube is using the third-party API source from YouTube. All the free video is provided by Youtube services. And you can search and play the videos on Youtube.
2. Please use the following link to report any content that may infringe copyrights:
https://www.youtube.com/yt/copyright/
3.Playing music when the screen is off or on the lock screen is not allowed by YouTube terms of use.
4.By complying with the API Terms of Use, we do not provide caching and downloading any tracks (not a video downloader)
Dowload by play store: Android
#PlayTube #VideoTube #MusicTube #freetube #dowloadyoutube #youtube
I made an app like this and I know what Google would do if you allowed Download and Background features.
What do you mean when you say 'Download & Background' and then say ' 3.Playing music when the screen is off or on the lock screen is not allowed by YouTube terms of use.'?

How to pass "User-Agent" parameter using intent ?

Hello ,
Im trying to launch MX Player by the web api as following but it seems I can't pass the user-agent parameter
Launch through Intent scheme.
Click to expand...
Click to collapse
When I try to launch the MX Player by clicking on the link it redirects me on Google Play Store even though I have already MXPlayer installed . When I remove the S.User-Agent , MX Player launches correctly . Any solutions ?

Categories

Resources