Giter Site home page Giter Site logo

baseflow / exoplayerxamarin Goto Github PK

View Code? Open in Web Editor NEW
151.0 25.0 67.0 102.08 MB

Xamarin bindings library for the Google ExoPlayer library

Home Page: https://baseflow.com

License: MIT License

C# 100.00%
exoplayer c-sharp xamarin nuget google-exoplayer android media mediaplayer baseflow

exoplayerxamarin's Introduction

ExoPlayer Plugin for Xamarin

license Build status NuGet NuGet Pre Release GitHub tag MyGet

Xamarin bindings library for the Google ExoPlayer library.

ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Android’s MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to customize and extend, and can be updated through Play Store application updates.

Support

  • Feel free to open an issue. Make sure to use one of the templates!
  • Commercial support is available. Integration with your app or services, samples, feature request, etc. Email: [email protected]
  • Powered by: baseflow.com

Documentation

Using ExoPlayer

The ExoPlayer plugin is available on Nuget.

    var HttpDataSourceFactory = new DefaultHttpDataSource.Factory().SetAllowCrossProtocolRedirects(true);
    var MainDataSource = new ProgressiveMediaSource.Factory(HttpDataSourceFactory);
    var Exoplayer = new IExoPlayer.Builder(Context).SetMediaSourceFactory(MainDataSource).Build();

    MediaItem mediaItem = MediaItem.FromUri(Android.Net.Uri.Parse("https://ia800806.us.archive.org/15/items/Mp3Playlist_555/AaronNeville-CrazyLove.mp3"));

    Exoplayer.AddMediaItem(mediaItem);
    Exoplayer.Prepare();
    Exoplayer.PlayWhenReady = true;

See the Exoplayer.Droid sample app for further details.

IMPORTANT: Exoplayer 2.9.0 and up requires Visual Studio 2019 with R8 and D8. You also need to enable AAPT2. Readmore at: https://devblogs.microsoft.com/xamarin/androids-d8-dexer-and-r8-shrinker/

Thanks to

License

  • ExoPlayerXamarin plugin is licensed under MIT

exoplayerxamarin's People

Contributors

archangelwtf avatar bspinner avatar dependabot[bot] avatar janwiebe-jump avatar lrp-sgravel avatar martijn00 avatar mattharrington avatar mkuckert avatar nezz avatar sjoerd0301 avatar softlion avatar thefex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exoplayerxamarin's Issues

Namespaces do not exist

When I build the solution I get the following errors;

1>W:\ExoPlayerXamarin-master\ExoPlayer\obj\Debug\generated\src\Com.Google.Android.Exoplayer.Chunk.Chunk.cs(9,112,9,118): error CS0234: The type or namespace name 'Loader' does not exist in the namespace 'Com.Google.Android.Exoplayer.Upstream' (are you missing an assembly reference?)
1>W:\ExoPlayerXamarin-master\ExoPlayer\obj\Debug\generated\src\Com.Google.Android.Exoplayer.Chunk.MultiTrackChunkSource.cs(9,110,9,119): error CS0234: The type or namespace name 'ExoPlayer' does not exist in the namespace 'Com.Google.Android.Exoplayer' (are you missing an assembly reference?)
1>W:\ExoPlayerXamarin-master\ExoPlayer\obj\Debug\generated\src\Com.Google.Android.Exoplayer.TrackRenderer.cs(9,111,9,120): error CS0234: The type or namespace name 'ExoPlayer' does not exist in the namespace 'Com.Google.Android.Exoplayer' (are you missing an assembly reference?)
1>W:\ExoPlayerXamarin-master\ExoPlayer\obj\Debug\generated\src\Com.Google.Android.Exoplayer.Parser.Webm.DefaultWebmExtractor.cs(13,130,13,147): error CS0234: The type or namespace name 'IEbmlEventHandler' does not exist in the namespace 'Com.Google.Android.Exoplayer.Parser.Webm' (are you missing an assembly reference?)
1>W:\ExoPlayerXamarin-master\ExoPlayer\obj\Debug\generated\src\Com.Google.Android.Exoplayer.Upstream.DataSourceStream.cs(9,121,9,127): error CS0234: The type or namespace name 'Loader' does not exist in the namespace 'Com.Google.Android.Exoplayer.Upstream' (are you missing an assembly reference?)
1>W:\ExoPlayerXamarin-master\ExoPlayer\obj\Debug\generated\src\Com.Google.Android.Exoplayer.Text.Ttml.TtmlSubtitle.cs(31,71,31,79): error CS0234: The type or namespace name 'TtmlNode' does not exist in the namespace 'Com.Google.Android.Exoplayer.Text.Ttml' (are you missing an assembly reference?)

Exoplayer crashes on init on Android 5.1

Starting Exoplayer on Android 5.1 causes a crash like this.

I am starting the player like this. I can repro the crash both on emulator and device.

mainHandler = new Handler();
bandwidthMeter = new DefaultBandwidthMeter();
FixedTrackSelection.Factory trackSelection =
	                   new FixedTrackSelection.Factory();
TrackSelector trackSelector =
                         new DefaultTrackSelector(mainHandler, trackSelection);

// 2. Create a default LoadControl
DefaultLoadControl loadControl = new DefaultLoadControl();
// 3. Create the player
mediaPlayer =
ExoPlayerFactory.NewSimpleInstance(Forms.Context, trackSelector, loadControl);

System.NotSupportedException: Could not activate JNI Handle 0x41245338 (key_handle 0x41245338) of Java type 'md5f170bbb6b61c93fc18e3a047e02d52b2/MediaPlayerService' as managed type 'AndroidSharedRadioLibrary.MediaPlayerService'. ---> Java.Lang.LinkageError: com/google/android/exoplayer2/mediacodec/MediaCodecRenderer
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ecf4a1a627f545d793bb611dec828a4b>:0
  at Java.Interop.JniEnvironment+StaticMethods.CallStaticObjectMethod (Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00082] in <416acbd7c0374f16924e03eb9254e276>:0
  at Android.Runtime.JNIEnv.CallStaticObjectMethod (System.IntPtr jclass, System.IntPtr jmethod, Android.Runtime.JValue* parms) [0x0000e] in <1b9025bec4f543eba09722bb3dcb8e68>:0
  at Com.Google.Android.Exoplayer2.ExoPlayerFactory.NewSimpleInstance (Android.Content.Context p0, Com.Google.Android.Exoplayer2.Trackselection.TrackSelector p1, Com.Google.Android.Exoplayer2.ILoadControl p2) [0x00079] in /Users/bmerha/RadioApp_TFS/RadioApp/ExoPlayer/obj/Debug/generated/src/Com.Google.Android.Exoplayer2.ExoPlayerFactory.cs:89
  at SharedRadioLibrary.Droid2.ExoMediaPlayer..ctor () [0x0003e] in /Users/bmerha/RadioApp_TFS/RadioApp/SharedRadioLibrary.Droid2/DependencyServices/ExoMediaPlayer.cs:37
  at AndroidSharedRadioLibrary.MediaPlayerService..ctor () [0x00020] in /Users/bmerha/RadioApp_TFS/RadioApp/SharedRadioLibrary.Droid2/DependencyServices/MediaPlayerService.cs:70
  at at (wrapper dynamic-method) System.Object:01bcd123-a28b-4c94-b507-2a6188b21c16 (intptr,object[])
  at Java.Interop.TypeManager.n_Activate (System.IntPtr jnienv, System.IntPtr jclass, System.IntPtr typename_ptr, System.IntPtr signature_ptr, System.IntPtr jobject, System.IntPtr parameters_ptr) [0x000fb] in <1b9025bec4f543eba09722bb3dcb8e68>:0
  at java.lang.VerifyError: com/google/android/exoplayer2/mediacodec/MediaCodecRenderer
  at at com.google.android.exoplayer2.SimpleExoPlayer.buildRenderers(SimpleExoPlayer.java:535)
  at at com.google.android.exoplayer2.SimpleExoPlayer.<init>(SimpleExoPlayer.java:138)
  at at com.google.android.exoplayer2.ExoPlayerFactory.newSimpleInstance(ExoPlayerFactory.java:103)
  at at com.google.android.exoplayer2.ExoPlayerFactory.newSimpleInstance(ExoPlayerFactory.java:81)
  at at com.google.android.exoplayer2.ExoPlayerFactory.newSimpleInstance(ExoPlayerFactory.java:62)
  at at com.google.android.exoplayer2.ExoPlayerFactory.newSimpleInstance(ExoPlayerFactory.java:47)
  at at mono.android.TypeManager.n_activate(Native Method)
  at at mono.android.TypeManager.Activate(TypeManager.java:7)
  at at md5f170bbb6b61c93fc18e3a047e02d52b2.MediaPlayerService.<init>(MediaPlayerService.java:29)
  at at java.lang.Class.newInstanceImpl(Native Method)
  at at java.lang.Class.newInstance(Class.java:1319)
  at at android.app.ActivityThread.handleCreateService(ActivityThread.java:2234)
  at at android.app.ActivityThread.access$1600(ActivityThread.java:123)
  at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
  at at android.os.Handler.dispatchMessage(Handler.java:99)
  at at android.os.Looper.loop(Looper.java:137)
  at at android.app.ActivityThread.main(ActivityThread.java:4424)
  at at java.lang.reflect.Method.invokeNative(Native Method)
  at at java.lang.reflect.Method.invoke(Method.java:511)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  at at dalvik.system.NativeStart.main(Native Method)
  --- End of inner exception stack trace ---
  at Java.Interop.TypeManager.n_Activate (System.IntPtr jnienv, System.IntPtr jclass, System.IntPtr typename_ptr, System.IntPtr signature_ptr, System.IntPtr jobject, System.IntPtr parameters_ptr) [0x00189] in <1b9025bec4f543eba09722bb3dcb8e68>:0
  at at (wrapper dynamic-method) System.Object:de7db137-f1a7-49f5-a436-ba77c7827a19 (intptr,intptr,intptr,intptr,intptr,intptr)

HLS manual change the quality.

Is possible using ExoPlayerXamarin to get information about the available qualities video stream from m3u8 file, so that the user can manually select a video stream?

Cannot implement any custom IMediaSource implementations

IMediaSource missing the abstract methods PrepareSource and CreatePeriod which the corresponding java MediaSource class is expecting an implementation of. Because of this, there can be no implementations of the IMediaSource interface which compiles properly for the corresponding Java version. This is the error:

TrackExtractorMediaSource.java(4, 8): [null]  error: TrackExtractorMediaSource is not abstract and does not override abstract method createPeriod(MediaPeriodId,Allocator) in MediaSource
public class TrackExtractorMediaSource

I've tried adding in the exact method signature in my C# source without the interface having the method, and it just doesn't pick them up.

Now, it's obvious that these are missing because the Metadata.xml for ExoPlayer.Core has this:

<!-- Those methods mark the whole file invalid. Remove them for now -->
	<remove-node path="/api/package[@name='com.google.android.exoplayer2.source']/interface[@name='MediaSource']/method[@name='prepareSource']" />
	<remove-node path="/api/package[@name='com.google.android.exoplayer2.source']/interface[@name='MediaSource']/method[@name='createPeriod']" />

Now, I've been googling around and found this thread with the similar issue I belive: https://forums.xamarin.com/discussion/35713/xamarin-jar-binding-library-metadata-xml-tips-for-missing-abstract-method

So I tried pulling this project down and building myself (without any modifications), and i'm getting ~45 errors, so my environment must not be compatible (I'm using Visual Studio for Mac 7.3.3 build 12, Xamarin.Android 8.1.5.0). In the mean time i'm going to try and see if i can build locally, but i wanted to post the issue incase you had a solution (I haven't done much with Xamarin bindings...)

Update samples to work with 2.8.0

On #61, it's mentioned that the samples work with 2.5.2 which Google released in September of last year. Can you update the samples so they work with 2.8.0?

Error when playing mkv files over 4GB

The exeption I get is the following.

07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): Source error. 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): java.io.EOFException 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:252) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at com.google.android.exoplayer2.extractor.DefaultExtractorInput.skipFully(DefaultExtractorInput.java:95) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at com.google.android.exoplayer2.extractor.DefaultExtractorInput.skipFully(DefaultExtractorInput.java:104) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at com.google.android.exoplayer2.extractor.mkv.DefaultEbmlReader.read(DefaultEbmlReader.java:127) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.read(MatroskaExtractor.java:340) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:635) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at java.util.concurrent.FutureTask.run(FutureTask.java:237) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 07-02 21:46:02.669 E/ExoPlayerImplInternal(10387): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

I think this issue is related to this issue. google/ExoPlayer#641

Are the current exoplayer jars binded in your nuget ExoPlayerXamarin package?

Btw. Thank you very much for the xamarin bindings!

Upgrade to 2.9.0 causes Android build failure: COMPILETODALVIK PARSE error

Steps to reproduce 📜

  1. Upgrade via NuGet to 2.9.0

  2. Rebuild Android project

Expected behavior 🤔

Successful build

Actual behavior 🐛

This causes a build failure in the Android project with several of these error lines in the output:
2>COMPILETODALVIK : PARSE error :

Note there are no error details displayed. If I return to the previous version I was using (2.8.5), it builds successfully.

Configuration 🔧

Version: 2.9.0

Platform:

  • 📱 iOS
  • 🤖 Android
  • 🏁 WPF
  • 🌎 UWP
  • 🍎 MacOS
  • 📺 tvOS
  • 🐒 Xamarin.Forms

Missing binding method on 2.5.1?

Is SimpleExoPlayer binding class missing the Prepare methods?:

public void Prepare(MediaSource mediaSource);

public void Prepare(MediaSource mediaSource, boolean resetPosition, boolean resetState);

addListener crashes the app

Looks like adding listener crashes the app

Handler mainHandler = new Handler();
            bandwidthMeter = new DefaultBandwidthMeter();
            AdaptiveVideoTrackSelection.Factory videoTrackSelectionFactory =
                new AdaptiveVideoTrackSelection.Factory(bandwidthMeter);
            TrackSelector trackSelector =
                new DefaultTrackSelector(mainHandler, videoTrackSelectionFactory);

            // 2. Create a default LoadControl
            DefaultLoadControl loadControl = new DefaultLoadControl();

            // 3. Create the player
            mediaPlayer =
                ExoPlayerFactory.NewSimpleInstance(Forms.Context, trackSelector, loadControl);
            mediaPlayer.AddListener(new ExoPlayerListener());

My listener looks like this

class ExoPlayerListener : IExoPlayerEventListener
    {

        public IntPtr Handle
        {
            get
            {
                return this.Handle;
            }
        }

        public void OnPlayWhenReadyCommitted()
        {
            MessagingCenter.Send<IMediaPlayer>(RadioApp.Forms.Portable.RadioApp.MediaPlayer,
                                                       AppMessages.MESSAGE_PLAYER_STARTED);
        }

        public void OnPlayerStateChanged(bool p0, int p1)
        {
            System.Diagnostics.Debug.WriteLine(System.String.Format("OnPlayerStateChanged( {0},{1})", p0, p1));
        }

        public void Dispose()
        {
        }

        public void OnLoadingChanged(bool p0)
        {
            System.Diagnostics.Debug.WriteLine("OnLoadingChanged()");
        }

        public void OnPlayerError(ExoPlaybackException p0)
        {
            System.Diagnostics.Debug.WriteLine("Error when playing media. " + p0.Message);
            MessagingCenter.Send<IMediaPlayer>(RadioApp.Forms.Portable.RadioApp.MediaPlayer,
                                               AppMessages.MESSAGE_PLAYER_FAILED);
        }

        public void OnPositionDiscontinuity()
        {
            System.Diagnostics.Debug.WriteLine("OnPositionDiscontinuity()");
        }

        public void OnTimelineChanged(Timeline p0, Java.Lang.Object p1)
        {
            System.Diagnostics.Debug.WriteLine("OnTimelineChanged()");
        }

    }

The error I see is this:

[Mono] Assembly Ref addref Mono.Android[0xe98b1020] -> System.Runtime.Serialization[0xd7ef1a60]: 3
[ExoPlayerImpl] Init 2.0.4
[google-breakpad] ### ### ### ### ### ### ### ### ### ### ### ### ###
[google-breakpad] Chrome build fingerprint:
[google-breakpad] 1.0.1
[google-breakpad] 2
[google-breakpad] ### ### ### ### ### ### ### ### ### ### ### ### ###
[mono-rt] Stacktrace:
[mono-rt]
[mono-rt] at <0xffffffff>
[mono-rt] at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) <0x00047>
[mono-rt] at System.Reflection.MonoCMethod.InternalInvoke (object,object[]) [0x00002] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:661
[mono-rt] at System.RuntimeType.CreateInstanceMono (bool) [0x000ca] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:179
[mono-rt] at System.RuntimeType.CreateInstanceSlow (bool,bool,bool,System.Threading.StackCrawlMark&) [0x0001a] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:153
[mono-rt] at System.RuntimeType.CreateInstanceDefaultCtor (bool,bool,bool,System.Threading.StackCrawlMark&) [0x0002a] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/mscorlib/system/rttype.cs:5638
[mono-rt] at System.Activator.CreateInstance (System.Type,bool) [0x00040] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/mscorlib/system/activator.cs:201
[mono-rt] at System.Activator.CreateInstance (System.Type) [0x00000] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/mscorlib/system/activator.cs:134
[mono-rt] at Xamarin.Forms.DependencyService.Get<T_REF> (Xamarin.Forms.DependencyFetchTarget) [0x0006c] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Core\DependencyService.cs:36
[mono-rt] at RadioApp.Forms.Portable.RadioApp.get_MediaPlayer () [0x00002] in /Users/bmerha/RadioApp_TFS/RadioApp/RadioApp.Forms.Portable/RadioApp.cs:70
[mono-rt] at RadioApp.Forms.Portable.PlayPage..ctor (RadioApp.Forms.Portable.MediaItem) [0x0007e] in /Users/bmerha/RadioApp_TFS/RadioApp/RadioApp.Forms.Portable/Pages/PlayPage.xaml.cs:51
[mono-rt] at RadioApp.Forms.Portable.BasePage/c__async0.MoveNext () [0x00156] in /Users/bmerha/RadioApp_TFS/RadioApp/RadioApp.Forms.Portable/Pages/BasePage.cs:28
[mono-rt] at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<RadioApp.Forms.Portable.BasePage/c__async0> (RadioApp.Forms.Portable.BasePage/c__async0&) [0x00031] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:316
[mono-rt] at RadioApp.Forms.Portable.BasePage.NavigateList (RadioApp.Forms.Portable.MediaItem) <IL 0x00026, 0x0016b>
[mono-rt] at RadioApp.Forms.Portable.MainPageTab/c__async8.MoveNext () [0x00044] in /Users/bmerha/RadioApp_TFS/RadioApp/RadioApp.Forms.Portable/Pages/MainPageTab.xaml.cs:54
[mono-rt] at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<RadioApp.Forms.Portable.MainPageTab/c__async8> (RadioApp.Forms.Portable.MainPageTab/c__async8&) [0x00031] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:84
[mono-rt] at RadioApp.Forms.Portable.MainPageTab.m__2 (object,Xamarin.Forms.SelectedItemChangedEventArgs) [0x00010] in /Users/bmerha/RadioApp_TFS/RadioApp/RadioApp.Forms.Portable/Pages/MainPageTab.xaml.cs:50
[mono-rt] at (wrapper delegate-invoke) System.EventHandler`1<TEventArgs_REF>.invoke_void_object_TEventArgs (object,TEventArgs_REF) <IL 0x00073, 0x0015f>
[mono-rt] at Xamarin.Forms.ListView.OnSelectedItemChanged (Xamarin.Forms.BindableObject,object,object) [0x0000f] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Core\ListView.cs:566
[mono-rt] at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty,Xamarin.Forms.BindableObject/BindablePropertyContext,object,bool,Xamarin.Forms.BindableObject/SetValueFlags,bool) [0x00108] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Core\BindableObject.cs:584
[mono-rt] at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty,object,Xamarin.Forms.BindableObject/SetValueFlags,Xamarin.Forms.BindableObject/SetValuePrivateFlags) [0x0014b] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Core\BindableObject.cs:378
[mono-rt] at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty,object,Xamarin.Forms.BindableObject/SetValueFlags) [0x00000] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Core\BindableObject.cs:324
[mono-rt] at Xamarin.Forms.ListView.NotifyRowTapped (int,int,Xamarin.Forms.Cell) [0x00040] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Core\ListView.cs:386
[mono-rt] at Xamarin.Forms.ListView.NotifyRowTapped (int,Xamarin.Forms.Cell) [0x00023] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Core\ListView.cs:403
[mono-rt] at Xamarin.Forms.ListView.Xamarin.Forms.IListViewController.NotifyRowTapped (int,Xamarin.Forms.Cell) [0x00000] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Core\ListView.cs:408
[mono-rt] at Xamarin.Forms.Platform.Android.ListViewAdapter.HandleItemClick (Android.Widget.AdapterView,Android.Views.View,int,long) [0x00057] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\ListViewAdapter.cs:383
[mono-rt] at Xamarin.Forms.Platform.Android.CellAdapter.OnItemClick (Android.Widget.AdapterView,Android.Views.View,int,long) [0x0002e] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\CellAdapter.cs:142
[mono-rt] at Android.Widget.AdapterView/IOnItemClickListenerInvoker.n_OnItemClick_Landroid_widget_AdapterView_Landroid_view_View_IJ (intptr,intptr,intptr,intptr,int,long) [0x00019] in /Users/builder/data/lanes/3819/96c7ba6c/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Widget.AdapterView.cs:215
[mono-rt] at (wrapper dynamic-method) object.68d3d0cd-8336-4831-bc32-64284bfd29b8 (intptr,intptr,intptr,intptr,int,long) <IL 0x00029, 0x0009b>
[mono-rt] at (wrapper native-to-managed) object.68d3d0cd-8336-4831-bc32-64284bfd29b8 (intptr,intptr,intptr,intptr,int,long) <IL 0x00027, 0x0014f>
[mono-rt]
[mono-rt] Attempting native Android stacktrace:
[mono-rt]
[mono-rt] at +0 [0xdba23178]
[mono-rt] at +0 [0x0]
[mono-rt]
[mono-rt] =================================================================
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries
[mono-rt] used by your application.
[mono-rt] =================================================================
[mono-rt]
[libc] Fatal signal 11 (SIGSEGV), code 2, fault addr 0xff7cafe0 in tid 19489 (pps.wengelradio)

How to disable the HW acceleration ?

Hello ,
When I play some videos on my machine with my app that uses ExoplayerXamarin, I get some green bar on top . or sometimes lagging .
I know the problem is with the HW acceleration . So is there a way to turn it off and use the software decoders ?

OnAudioTrackUnderrun(int, long, long) is missing

Hi,

I keep getting the following when I compile the zip folder under 1.5.3. 1.5.2 works fine.

VideoPlayer' does not implement interface member 'MediaCodecAudioTrackRenderer.IEventListener.OnAudioTrackUnderrun(int, long, long)

I confirmed that this method is not implemented in VideoPlayer.

Progress changed and headphones unplugged notification

Hi,

Sorry, I ended up changing the title a few times since I found solutions on my own. However, I need to do two things:

  • Progress changed: How do you track progress? I have a custom slider so I need to update its value as the media progresses.
  • Headphones unplugged; How can I receive a notification when headphones are unplugged?

Update sample code so it runs for 1.5.4

I can't compile and run the sample code in VS2015.

'VideoPlayer' does not implement interface member 'DashChunkSource.IEventListener.OnAvailableRangeChanged(int, ITimeRange)'

ExoPlayer can't play Vimeo videos

When I try to play a video hosted on Vimeo, the player throws a java.security.cert.CertificateException (this is Exoplayer 1). It used to work before, any idea why the Vimeo certificates are not being recognised? I'm using the DefaultUriDataSource implementation (which uses HttpsURLConnection).

iOS

Maybe this is really stupid, but, have some chance to do this work for iOS?

Upgrade to 2.9.0 causes Android build failure: java.lang.NoClassDefFoundError: com/google/android/exoplayer2/upstream/Loader$Callback

added "<AndroidEnableDesugar>true<AndroidEnableDesugar>"

1>Exception in thread "main" java.lang.NoClassDefFoundError: com/google/android/exoplayer2/upstream/Loader$Callback
1> at java.lang.ClassLoader.defineClass1(Native Method)
1> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
1> at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
1> at com.google.devtools.build.android.desugar.HeaderClassLoader.findClass(HeaderClassLoader.java:66)
1> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
1> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
1> at com.google.devtools.build.android.desugar.LambdaDesugaring.loadFromInternal(LambdaDesugaring.java:330)
1> at com.google.devtools.build.android.desugar.LambdaDesugaring.access$500(LambdaDesugaring.java:53)
1> at com.google.devtools.build.android.desugar.LambdaDesugaring$InvokedynamicRewriter.createLookup(LambdaDesugaring.java:559)
1> at com.google.devtools.build.android.desugar.LambdaDesugaring$InvokedynamicRewriter.visitInvokeDynamicInsn(LambdaDesugaring.java:395)
1> at org.objectweb.asm.MethodVisitor.visitInvokeDynamicInsn(Unknown Source)
1> at org.objectweb.asm.MethodVisitor.visitInvokeDynamicInsn(Unknown Source)
1> at org.objectweb.asm.ClassReader.a(Unknown Source)
1> at org.objectweb.asm.ClassReader.b(Unknown Source)
1> at org.objectweb.asm.ClassReader.accept(Unknown Source)
1> at org.objectweb.asm.ClassReader.accept(Unknown Source)
1> at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:401)

Dim Video On Some Android Devices

For some reason so far on an Android 6.0 Samsung Galaxy 6 the video's brightness is normal but on Android 6.0 for an LG-G4, Android 7.1.1 Pixel and 6P the video is dim. Both have the same code and the same video source.

It is quite confusing. I suspect it is an issue with ExoPlayer.

Add version of JAR to the filename

Currently the JAR file is somewhere after 1.0.11 - I guess it's 553a1d2ec15b3d34f76aff720d42de2f663eb55f (https://github.com/google/ExoPlayer/commits/master).

Please add the JAR file in the latest version - and not somewhere between two releases.

I tried to build the JAR file, but it failed. Maybe it works for you ...

Here's what I got in detail as error:

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/simon/ExoPlayer/demo/build.gradle' line: 27

* What went wrong:
A problem occurred evaluating project ':demo'.
> Ambiguous method overloading for method java.io.File#<init>.
  Cannot resolve which method to invoke for [null, class java.lang.String] due to overlapping prototypes between:
    [class java.lang.String, class java.lang.String]
    [class java.io.File, class java.lang.String]

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Reported it to the original repo: google/ExoPlayer#161

Retain played media in buffer unless space is actually needed to buffer further ahead

@martijn00 we are using ExoPlayer to play .MP4 files which is playing very well but there is a problem with seek. When we backward the seek bar it is not retain the buffered content.

The same issue already reported in original Android Exoplayer @ https://github.com/google/ExoPlayer/issues/896 and it got solved in the latest version.

Could you please update the bindings for us. We are relaying on this media player to play the .Mp4 Videos but with out retain buffered data we can not go for a release.

Please update the bindings. Thank you

Wav support

Hi,

today I downloaded the version 1.5.8 from your great project but I have a big problem.
It seems that the WavExtractor is missing. If I extract the aar file from your repository there is a WavExtractor.class inside the "com\google\android\exoplayer\extractor\wav" folder but there is no c# class for that.
Is there a reason why the WavExtractor is missing?

Play local mp4 files

Good morning,
i have problem with the last nuget package version.

    Android.Net.Uri dashUri = Android.Net.Uri.Parse("http://www-itec.uni-klu.ac.at/ftp/datasets/DASHDataset2014/BigBuckBunny/15sec/BigBuckBunny_15s_simple_2014_05_09.mpd");
    Android.Net.Uri httpUri = Android.Net.Uri.Parse("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4");
    Android.Net.Uri fileUri = Android.Net.Uri.FromFile(new File("/mnt/am_sd2/VideoPubblicitari/Vendita.mp4"));

    //1 WORK OK
    //DashMediaSource mediaSource = new DashMediaSource(dashUri, dataSourceFactory, new DefaultDashChunkSource.Factory(dataSourceFactory), null, null);
    //2 WORK OK
    //IMediaSource mediaSource = new ExtractorMediaSource(httpUri, dataSourceHttpFactory, new DefaultExtractorsFactory(), null, null);
    //3 NOT WORK
    IMediaSource mediaSource = new ExtractorMediaSource(fileUri, dataSourceHttpFactory, new DefaultExtractorsFactory(), null, null);

The first two points are working properly, I can not find a solution in order to display a mp4 video taken from local storage.

Can you help me?

Implements the OkHttp extension

Hi,

I'm try to play shoutcast AAC stream, but works only in android API 20+.

I search this bug in ExoPlayer repositorie and I find this issue: google/ExoPlayer#1157 (comment) and I got success when I build Java APP with this new OkHttpDataSource(client, "ExoPlayer", null, null) ´part of OkHttp extension...
I try binding ths class and re code in C# but I fail...

Can you implement this? Or say what I do?

Thanks so much!

java.lang.IllegalArgumentException at android.media.MediaCodec.native_setSurface

Good morning i have this exception when i play a .mp4 video from sdcard:

09-19 15:07:08.083 I/MediaCodec(17696): [OMX.Freescale.std.video_decoder.avc.v3.hw-based] setting surface generation to 18120706 09-19 15:07:08.085 D/SurfaceUtils(17696): set up nativeWindow 0x962d3d08 for 1024x576, color 0x13, rotation 0, usage 0x8002900 09-19 15:07:08.085 E/ACodec (17696): new surface holds onto more buffers (1) than planned for (0) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): Internal runtime error. 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): java.lang.IllegalArgumentException 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at android.media.MediaCodec.native_setSurface(Native Method) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at android.media.MediaCodec.setOutputSurface(MediaCodec.java:1797) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutputSurfaceV23(MediaCodecVideoRenderer.java:743) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setSurface(MediaCodecVideoRenderer.java:360) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.handleMessage(MediaCodecVideoRenderer.java:327) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessagesInternal(ExoPlayerImplInternal.java:849) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:386) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at android.os.Handler.dispatchMessage(Handler.java:98) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at android.os.Looper.loop(Looper.java:148) 09-19 15:07:08.086 E/ExoPlayerImplInternal(17696): at android.os.HandlerThread.run(HandlerThread.java:61)

This is my OnCreate functions:

`protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);

        // Set our view from the "main" layout resource
        SetContentView(Resource.Layout.Main);

        DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
        AdaptiveTrackSelection.Factory videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter);
        TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);

        player = ExoPlayerFactory.NewSimpleInstance(this, trackSelector);

        simpleExoPlayerView = (SimpleExoPlayerView)FindViewById(Resource.Id.player_view);

        simpleExoPlayerView.UseController = (true);
        simpleExoPlayerView.RequestFocus();

        simpleExoPlayerView.Player = (player);

        string urimp4 = "/mnt/am_sd2/VideoPubblicitari/CocaCola.mp4"; //upload file to device and add path/name.mp4
        Uri mp4VideoUri = Uri.Parse(urimp4);

        //Measures bandwidth during playback. Can be null if not required.
        DefaultBandwidthMeter bandwidthMeterA = new DefaultBandwidthMeter();
        //Produces DataSource instances through which media data is loaded.
        DefaultDataSourceFactory dataSourceFactory = new DefaultDataSourceFactory(this, Util.GetUserAgent(this, "ExoPlayerExample"), bandwidthMeterA);
        //Produces Extractor instances for parsing the media data.
        DefaultExtractorsFactory extractorsFactory = new DefaultExtractorsFactory();

        //This is the MediaSource representing the media to be played:
        //FOR SD CARD SOURCE
        IMediaSource videoSource = new ExtractorMediaSource(mp4VideoUri, dataSourceFactory, extractorsFactory, null, null);

        //FOR LIVESTREAM LINK:
        //        MediaSource videoSource = new HlsMediaSource(mp4VideoUri, dataSourceFactory, 1, null, null);

        loopingSource = new LoopingMediaSource(videoSource);

        // Prepare the player with the source.
        player.Prepare(loopingSource);
        player.AddListener(this);
        player.SetVideoDebugListener(this);
        player.PlayWhenReady = true;

    }`

Where is the problem?

Method not found 'Android.Runtime.JNIEvn.CallStaticOjbectMethod

Hi Martijn,
I download your code, and running with Android 5.0, it throw error "Method not found 'Android.Runtime.JNIEvn.CallStaticOjbectMethod" on line "mediaPlayer = Com.Google.Android.Exoplayer.ExoPlayerFactory.NewInstance(1)", I'm not sure how to resolve the problem, any suggestions?
Thanks,
Shirley

Can't get subtitles working.

Can't seem to get subtitles working with SimpleExoPlayer (ExoPlayerXamarin 2.5.1.2).

Using the following urls:
http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
http://html5doctor.com/demos/webvtt/subtitles.vtt

Full activity code sample:

[Activity(Label = "VideoPlayerActivity")]
public class VideoPlayerActivity : Activity
{
	private string videoUrl;
	private string captionUrl;
	private SimpleExoPlayerView videoPlayerView;
	private SimpleExoPlayer videoPlayer;

	protected override void OnCreate(Bundle savedInstanceState)
	{
		base.OnCreate(savedInstanceState);

		SetContentView(Resource.Layout.VideoPlayerLayout);

		videoPlayerView = FindViewById<SimpleExoPlayerView>(Resource.Id.VideoPlayerView);

		videoUrl = Intent.GetStringExtra("VideoUrl");
		captionUrl = Intent.GetStringExtra("CaptionUrl");

		LoadVideo(videoUrl, captionUrl);
	}

	public void LoadVideo(string videoUrl, string closedCaptionUrl = null)
	{
		var videoUri = (!string.IsNullOrWhiteSpace(videoUrl)) ? Android.Net.Uri.Parse(videoUrl) : null;
		var captionUri = (!string.IsNullOrWhiteSpace(closedCaptionUrl)) ? Android.Net.Uri.Parse(videoUrl) : null;

		Handler mainHandler = new Handler();
		var bandwidthMeter = new DefaultBandwidthMeter();
		var videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter);
		TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);

		videoPlayer = ExoPlayerFactory.NewSimpleInstance(this, trackSelector);

		var dataSourceFactory = new DefaultDataSourceFactory(this, Util.GetUserAgent(this, "VideoPlayer"), bandwidthMeter);
		var extractorsFactory = new DefaultExtractorsFactory();
		var videoSource = new ExtractorMediaSource(videoUri, dataSourceFactory, extractorsFactory, null, null);

		if (captionUri != null)
		{
			var subtitleFormat = Format.CreateTextSampleFormat(null, MimeTypes.TextVtt, C.SelectionFlagDefault, null);
			var subtitleSource = new SingleSampleMediaSource(captionUri, dataSourceFactory, subtitleFormat, C.TimeUnset);

			MergingMediaSource mergedSource = new MergingMediaSource(videoSource, subtitleSource);

			videoPlayer.Prepare(mergedSource);
		}
		else
		{
			videoPlayer.Prepare(videoSource);
		}

		videoPlayer.PlayWhenReady = true;
		videoPlayerView.Player = videoPlayer;
	}
}

Only first frame of video is shown - can't play video. If I remove the subtitleSource parameter from the MergingMediaSource constructor then the video plays fine so there seems to be something wrong with the creation of the SingleSampleMediaSource instance. I've tried lots of different variations of parameters for CreateTextSampleFormat but nothing has worked so far.

Help or guidance would be greatly appreciated.

VideoScalingMode causes exception, even though property should be valid

Hello,

I am trying to set the video scaling mode for my exoplayer instance using the following:

exoPlayer.VideoScalingMode = AspectRatioFrameLayout.ResizeModeFill;

In the native library, this is the appropriate way to set the scaling mode, it supports the constants provided by the AspectRatioFrameLayout. However when I try to set this value using the xamarin binding, I get the following exception:

[ExoPlayerImplInternal] java.lang.IllegalArgumentException
[ExoPlayerImplInternal] 	at android.media.MediaCodec.setVideoScalingMode(Native Method)
[ExoPlayerImplInternal] 	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setVideoScalingMode(MediaCodecVideoRenderer.java:1046)
[ExoPlayerImplInternal] 	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onOutputFormatChanged(MediaCodecVideoRenderer.java:502)
[ExoPlayerImplInternal] 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.processOutputFormat(MediaCodecRenderer.java:1027)
[ExoPlayerImplInternal] 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:969)
[ExoPlayerImplInternal] 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:552)
[ExoPlayerImplInternal] 	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:560)
[ExoPlayerImplInternal] 	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:306)
[ExoPlayerImplInternal] 	at android.os.Handler.dispatchMessage(Handler.java:102)
[ExoPlayerImplInternal] 	at android.os.Looper.loop(Looper.java:164)
[ExoPlayerImplInternal] 	at android.os.HandlerThread.run(HandlerThread.java:65)

Any help would be greatly appreciated.

Move navbar under player controls

Hi there!

Could someone say how I could move navbar under player controls?
I'm writing Xamarin Android video app and trying implement video player step by step. I am coping every line of code and trying understand what that line means. And what I can't get it is how navbar position on video player view is controlled?

In your example all fine, but in mine the seekbar is hidden by navbar. Please see attached picture for detail, it is self explanatory screenshot.

exoplayer controls

Here is XML code of player view:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
                 xmlns:tools="http://schemas.android.com/tools"
                 android:id="@+id/root"
                 android:focusable="true"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:keepScreenOn="true">

      <com.google.android.exoplayer.AspectRatioFrameLayout android:id="@+id/video_frame"
                                                           android:layout_width="match_parent"
                                                           android:layout_height="match_parent"
                                                           android:layout_gravity="center">

        <SurfaceView android:id="@+id/video_surface_view"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
                     android:layout_gravity="center" />

        <View android:id="@+id/shutter"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@android:color/black" />

        <com.google.android.exoplayer.text.SubtitleLayout android:id="@+id/subtitles"
                                                          android:layout_width="match_parent"
                                                          android:layout_height="match_parent" />

      </com.google.android.exoplayer.AspectRatioFrameLayout>

    </FrameLayout>

Maybe there is some property in style that control it?

How to Use This Library??

I tried to run the sample provided but not luck every time I build or rebuild it gives me errors.
Please any body help how to use this library to play videos

Sample doesn't seem to build

Steps to reproduce 📜

  1. Build ExoPlayer project
  2. then ExoPlayer (develop) sample

Expected behavior 🤔

Build run/test

Actual behavior 🐛

Compile failures around ExoPlayer.Demo::EventLogger.cs

internal sealed class EventLogger : Object, IPlayerEventListener, IAudioRendererEventListener,
	IVideoRendererEventListener, IAdaptiveMediaSourceEventListener,
	ExtractorMediaSource.IEventListener, DefaultDrmSessionManager.IEventListener,
	MetadataRenderer.IOutput

ExoPlayerXamarin/Samples/Official Demo/EventLogger.cs(68,68): Error CS0246: The type or namespace name 'IAudioRendererEventListener' could not be found (are you missing a using directive or an assembly reference?) (CS0246) (ExoPlayer.Demo)
ExoPlayerXamarin/Samples/Official Demo/EventLogger.cs(3,3): Error CS0246: The type or namespace name 'IVideoRendererEventListener' could not be found (are you missing a using directive or an assembly reference?) (CS0246) (ExoPlayer.Demo)
ExoPlayerXamarin/Samples/Official Demo/PlayerActivity.cs(65,65): Error CS0535: 'PlayerActivity' does not implement interface member 'IPlayerEventListener.OnTimelineChanged(Timeline, Object, int)' (CS0535) (ExoPlayer.Demo)
ExoPlayerXamarin/Samples/Official Demo/EventLogger.cs(46,46): Error CS0535: 'EventLogger' does not implement interface member 'IPlayerEventListener.OnTimelineChanged(Timeline, Object, int)' (CS0535) (ExoPlayer.Demo)

Configuration 🔧

Version: 2.x

Platform:

  • 🤖 Android

error en release build version 1.5.6

this error is in release build
Severity Code Description Project File Line Suppression State
Error The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'Android.Media.PlaybackParams' (defined in 'ExoPlayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'ExoPlayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve Android.Media.PlaybackParams
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
--- End of inner exception stack trace ---
at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() RadiApp

Implementation for LoadVideoItem in MvvmCross Sample project

I have implemented exoplayer referring to the sample MvvmCross project. The video works fine, but initially a black screen appears and after some time the video starts playing. I reckon, it is because, the video is loading.

In the sample project, there is a LoadVideoItem abstract method, which sets the bool variable LoadingItem which is responsible for the visibility of ProgressBar. But I could not find any implementation for the method. Any help with that would be great. Thank you.

Mistake on documentation

Hi,

I think you should change Documentation on main page, MediaCodecAudioTrackRenderer dont accept 2 params, the correct one could be for example:

TrackRenderer aRenderer = MediaCodecAudioTrackRenderer(sampleSource, MediaCodecSelector.Default);

Thanks for your work :)

Xamarin.Android.XamarinAndroidException: error XA2006:

When the APK for publish is generated, show the following error
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'Android.Media.PlaybackParams' (defined in 'ExoPlayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'ExoPlayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve Android.Media.PlaybackParams

AnalyticsListenerImplementor is not abstract and does not override abstract method onRenderedFirstFrame

I created a blank Xamarin.Android app in VS 15.7.1 and installed 2.8.0, but I cannot compile the project. This is the error I'm getting:

AnalyticsListenerImplementor is not abstract and does not override abstract method onRenderedFirstFrame(EventTime,Surface) in AnalyticsListener
public class AnalyticsListenerImplementor	App1ddd	C:\Users\xyz\Desktop\App1ddd\App1ddd\obj\Debug\android\src\mono\com\google\android\exoplayer2\analytics\AnalyticsListenerImplementor.java	4	

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.