Mx player Intent to play video - Android Q&A, Help & Troubleshooting

hi,
I have to play live video (103.78.14.20:8080/0.m3u8)
If i play video direct by MX player it playing fine( go to network Streaming to play this)
But When I am trying to play video by Intent using below code
TestActivity.MXPackageInfo packageInfo = getMXPackageInfo();
if( packageInfo == null )
return ;
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setPackage(packageInfo.packageName);
intent.setClassName(packageInfo.packageName, packageInfo.activityName);
intent.setData(Uri.parse("103.78.14.20:8080/0.m3u8"));
startActivity(intent);
Video will not be getting play. only getting cant play video.
Please help me, I am not getting what i am doing wrong

Related

[Q] How can I merge two wav files?

About an year ago I used this code:
Code:
private void merge2WavFiles(String wavFile1, String wavFile2, String newWavFilePath) {
try {
File wave1 = new File(wavFile1);
if(!wave1.exists())
throw new Exception(wave1.getPath() + " - File Not Found");
AudioInputStream clip1 = AudioSystem.getAudioInputStream(wave1);
AudioInputStream clip2 = AudioSystem.getAudioInputStream(new File(wavFile2));
AudioInputStream emptyClip =
AudioSystem.getAudioInputStream(new File(emptyWavPath));
AudioInputStream appendedFiles =
new AudioInputStream(
new SequenceInputStream(clip1, emptyClip),
clip1.getFormat(),
clip1.getFrameLength() + 100
);
clip1 = appendedFiles;
appendedFiles =
new AudioInputStream(
new SequenceInputStream(clip1, clip2),
clip1.getFormat(),
clip1.getFrameLength() + clip2.getFrameLength()
);
AudioSystem.write(appendedFiles, AudioFileFormat.Type.WAVE, new File(newWavFilePath));
} catch (Exception e) {
e.printStackTrace();
}
}
But today when I try to use it I get a page saying "Source not found".
After a little search using Google I found out that Android doesn't support AudioInputStream Class anymore. What are the alternative for this Class?
Moreover , I think that it doesn't support the hole package of: javax.sound.sampled.
What are the alternatives?
Anyone?
I think it could be solved by the AudioRecord class?
Merging two or more .wav files in android might be helpful as well...
I tried this and it didn't work
Questions should be posted in Q&A forums, not Development forums.
http://forum.xda-developers.com/announcement.php?a=81
See rule #15
Thread moved.
Have you tried Faasoft Audio Joiner?
I used it to merge WAV, MP3, AAC, AC3, WMA, M4B, VOC, CAF, APE, AIFF, Apple Lossless ALAC, QCP, AMR, AWB, DTS, AU, RA, OGG, XWM, 3GA and more.
Happy with it.
Many of my friends use iDealshare VideoGo to merge audio and video files into one
It can merge audio files into one; merge audio and video files into one; merge video files into one.
It supports merging audio and video files whatever it is in MP3, WAV, AAC, AC3, FLAC, ALAC, WMA, OGG, M4A, MP4, AVI, WMV, MOV, DV, AIFF, OGV, FLV, WebM, MKV, MPG, etc.

[Q] anroid rtmp stream player

Hi
I have tired with search for rtmp player and no solution to now .. my rtmp url (rtmp://63.228.105.121/live/live1) I want to play Direct from player in my app , i don't want flash player because there is some problems with s3 (jelly bean) player not working ... I found in google Play Store
app name : vPlayer ..
This app can play rtmp url with advanced options .. I need to know how can I play rtmp url stream in simple player no problem just play .. if any one have library please give some example with ..
I wait for any answer help me .
Thanks ...

[Q] Media Player

Anyone used the mediaplayer for video successfull? For me the Media Player opens fine but never play a video

How to start music playing in appropriate apps?

I am working on an open source voice assistant and want to be able to hand off requests like "Play 'yellow submarine' on Spotify" or "Play 'space oddity' on Google Play Music".
According to the documentation:
To play music based on a search query, use the INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH intent. An app may fire this intent in response to the user's voice command to play music. The receiving app for this intent performs a search within its inventory to match existing content to the given query and starts playing that content.
This intent should include the EXTRA_MEDIA_FOCUS string extra, which specifies the intended search mode. For example, the search mode can specify whether the search is for an artist name or song name.​
The value of INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH is "android.media.action.MEDIA_PLAY_FROM_SEARCH", and the value of EXTRA_MEDIA_FOCUS is "android.intent.extra.focus".
Here's a command line to launch an intent:
adb shell am start -a "android.media.action.MEDIA_PLAY_FROM_SEARCH" -e android.intent.extra.focus "vnd.android.cursor.item/*" -e query Bowie
When I run the command line, the chooser on my Pixel 2 running Android 10 gives me many options. Only one works as expected. If I select Google Play Music, it starts playing a song by David Bowie.
However, if I select Spotify or YouTube Music, it does a search for Bowie but does not play anything.
If I select YouTube, it just opens YouTube but doesn't do a search.
I have premium subscriptions to Spotify and YouTube, so the requests should work. When I ask the Google voice assistant "play bowie on Spotify" (or on YouTube), it plays a song by David Bowie.
How can I get my app to behave the same way as the Google voice assistant?

Video Kit: Initializing WisePlayer

Service Introduction
HUAWEI Video Kit provides video playback in this version, and will support video editing and video hosting in later versions, helping you quickly build desired video features to deliver a superb video experience to your app users.
Use Cases
Video playback: You can integrate the Video Kit WisePlayer SDK into your app to enable it to play streaming media from the address provided a third party. Streaming media can be in 3GP, MP4, or TS format and be compliant with HTTP/HTTPS, HLS, or DASH.
For example, you have developed a tool app, want to promote the app, and thereby launch a promotional video in it. You also have hosted the video in a third-party cloud platform. In this case, you can directly call the APIs of the Video Kit WisePlayer SDK to play the video online.
Initializing WisePlayer
Your app needs to implement a class that inherits from Application, and call the initialization API WisePlayerFactory.initFactory() of the WisePlayer SDK in the onCreate() method. The sample code is as follows:
Code:
private WisePlayerFactory factory;
@Override
public void onCreate() {
super.onCreate();
WisePlayerFactoryOptions factoryOptions = new WisePlayerFactoryOptions.Builder().setDeviceId("xxx").build();
// In the multi-process scenario, the onCreate method in Application is called multiple times.
// The app needs to call the WisePlayerFactory.initFactory() API in the onCreate method of the app process (named "app package name") and WisePlayer process (named "app package name:player").
WisePlayerFactory.initFactory(this, factoryOptions, new InitFactoryCallback() {
@Override
public void onSuccess(WisePlayerFactory wisePlayerFactory) {
Logger.d(TAG,"onSuccess wisePlayerFactory:" + wisePlayerFactory);
factory = wisePlayerFactory;
}
@Override
public void onFailure(int errorCode, String msg) {
Logger.e(TAG,"onFailure errorcode:" + errorCode + " reason:" + msg);
}
});
}
Note: WisePlayer starts a player process in the initFactory() API. The started player process triggers the onCreate() method in Application again. In this method, the WisePlayerFactory.initFactory() API is called again.
Where can I download the SDK?

Categories

Resources