Skip to content

Commit fd3d522

Browse files
authored
Merge pull request #159 from ArchangelWTF/develop
Update ExoPlayer to 2.19.1
2 parents 982c0c7 + 0beb759 commit fd3d522

File tree

115 files changed

+236
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+236
-13
lines changed

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
<RepositoryUrl>https://github.com/Baseflow/ExoPlayerXamarin</RepositoryUrl>
1717
<RepositoryType>git</RepositoryType>
1818
<Product>$(AssemblyName) ($(TargetFramework))</Product>
19-
<Version>2.18.11</Version>
19+
<Version>2.19.1</Version>
2020
<Platform>AnyCPU</Platform>
2121
<!--<TreatWarningsAsErrors>true</TreatWarningsAsErrors>-->
2222

23-
<TargetFrameworks>net6.0-android32.0;net6.0-android33.0;net7.0-android33.0</TargetFrameworks>
23+
<TargetFrameworks>net6.0-android33.0;net7.0-android33.0</TargetFrameworks>
2424

2525
<Nullable>enable</Nullable>
2626
<LangVersion>11.0</LangVersion>
-401 KB
Binary file not shown.
446 KB
Binary file not shown.
-326 KB
Binary file not shown.
380 KB
Binary file not shown.

ExoPlayer.Common/Transforms/Metadata.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@
232232
<remove-node path="/api/package[@name='com.google.android.exoplayer2']/interface[@name='Player']/method[@name='setMediaItems' and count(parameter)=1 and parameter[1][@type='java.util.List&lt;com.google.android.exoplayer2.MediaItem&gt;']]"/>
233233
<remove-node path="/api/package[@name='com.google.android.exoplayer2']/interface[@name='Player']/method[@name='setMediaItems' and count(parameter)=2 and parameter[1][@type='java.util.List&lt;com.google.android.exoplayer2.MediaItem&gt;'] and parameter[2][@type='boolean']]"/>
234234
<remove-node path="/api/package[@name='com.google.android.exoplayer2']/interface[@name='Player']/method[@name='setMediaItems' and count(parameter)=3 and parameter[1][@type='java.util.List&lt;com.google.android.exoplayer2.MediaItem&gt;'] and parameter[2][@type='int'] and parameter[3][@type='long']]"/>
235+
<remove-node path="/api/package[@name='com.google.android.exoplayer2']/interface[@name='Player']/method[@name='replaceMediaItems' and count(parameter)=3 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='java.util.List&lt;com.google.android.exoplayer2.MediaItem&gt;']]"/>
235236
<remove-node path="/api/package[@name='com.google.android.exoplayer2']/interface[@name='Player']/method[@name='getCurrentStaticMetadata' and count(parameter)=0]"/>
236237
<remove-node path="/api/package[@name='com.google.android.exoplayer2']/interface[@name='Player']/method[@name='getCurrentCues' and count(parameter)=0]"/>
237238

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Additions allow you to add arbitrary C# to the generated classes
2+
before they are compiled. This can be helpful for providing convenience
3+
methods or adding pure C# classes.
4+
5+
== Adding Methods to Generated Classes ==
6+
7+
Let's say the library being bound has a Rectangle class with a constructor
8+
that takes an x and y position, and a width and length size. It will look like
9+
this:
10+
11+
public partial class Rectangle
12+
{
13+
public Rectangle (int x, int y, int width, int height)
14+
{
15+
// JNI bindings
16+
}
17+
}
18+
19+
Imagine we want to add a constructor to this class that takes a Point and
20+
Size structure instead of 4 ints. We can add a new file called Rectangle.cs
21+
with a partial class containing our new method:
22+
23+
public partial class Rectangle
24+
{
25+
public Rectangle (Point location, Size size) :
26+
this (location.X, location.Y, size.Width, size.Height)
27+
{
28+
}
29+
}
30+
31+
At compile time, the additions class will be added to the generated class
32+
and the final assembly will a Rectangle class with both constructors.
33+
34+
35+
== Adding C# Classes ==
36+
37+
Another thing that can be done is adding fully C# managed classes to the
38+
generated library. In the above example, let's assume that there isn't a
39+
Point class available in Java or our library. The one we create doesn't need
40+
to interact with Java, so we'll create it like a normal class in C#.
41+
42+
By adding a Point.cs file with this class, it will end up in the binding library:
43+
44+
public class Point
45+
{
46+
public int X { get; set; }
47+
public int Y { get; set; }
48+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<AssemblyName>ExoPlayer.Container</AssemblyName>
4+
<RootNamespace>ExoPlayer.Container</RootNamespace>
5+
<Description>Xamarin bindings for ExoPlayer</Description>
6+
<PackageId>Xam.Plugins.Android.ExoPlayer.Container</PackageId>
7+
</PropertyGroup>
8+
</Project>
22.1 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)