Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Oct 21, 2020
1 parent dc8d922 commit 61e024a
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<RepositoryUrl>https://github.com/Baseflow/XamarinMediaManager</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<Version>1.0.3</Version>
<Version>1.0.4</Version>

<!--<Nullable>enable</Nullable>-->
<LangVersion>8.0</LangVersion>
Expand Down
4 changes: 2 additions & 2 deletions MediaManager.Forms/Platforms/Uap/VideoViewRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected override Size MeasureOverride(Size availableSize)
{
if (_videoView != null)
{
if(!double.IsInfinity(availableSize.Height))
if (!double.IsInfinity(availableSize.Height))
{
_videoView.Height = availableSize.Height;
_videoView.PlayerView.Height = availableSize.Height;
Expand All @@ -44,7 +44,7 @@ protected override Size MeasureOverride(Size availableSize)
_videoView.Height = MediaManager.MediaPlayer.VideoHeight > 0 ? MediaManager.MediaPlayer.VideoHeight : 300;
_videoView.PlayerView.Height = MediaManager.MediaPlayer.VideoHeight > 0 ? MediaManager.MediaPlayer.VideoHeight : 300;
}

_videoView.Width = availableSize.Width;
_videoView.PlayerView.Width = availableSize.Width;
}
Expand Down
6 changes: 2 additions & 4 deletions MediaManager.sln
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MediaManager.Reactive", "Me
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MediaManager.FFmpegMediaMetadataRetriever", "MediaManager.FFmpegMediaMetadataRetriever\MediaManager.FFmpegMediaMetadataRetriever.csproj", "{00D077AA-5CED-422E-91C7-3D515086DC22}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElementPlayer.Forms.WPFCore", "Samples\ElementPlayer.Forms.WPFCore\ElementPlayer.Forms.WPFCore.csproj", "{311FC5DB-E938-405C-ACA7-D74AC11B505E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElementPlayer.Forms.WPFCore", "Samples\ElementPlayer.Forms.WPFCore\ElementPlayer.Forms.WPFCore.csproj", "{311FC5DB-E938-405C-ACA7-D74AC11B505E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElementPlayer.WPFCore", "Samples\ElementPlayer.WPFCore\ElementPlayer.WPFCore.csproj", "{62642DB1-7FCF-455E-AAC0-7B9FE4764A5B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElementPlayer.WPFCore", "Samples\ElementPlayer.WPFCore\ElementPlayer.WPFCore.csproj", "{62642DB1-7FCF-455E-AAC0-7B9FE4764A5B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -607,7 +607,6 @@ Global
{311FC5DB-E938-405C-ACA7-D74AC11B505E}.Debug|x86.ActiveCfg = Debug|Any CPU
{311FC5DB-E938-405C-ACA7-D74AC11B505E}.Debug|x86.Build.0 = Debug|Any CPU
{311FC5DB-E938-405C-ACA7-D74AC11B505E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{311FC5DB-E938-405C-ACA7-D74AC11B505E}.Release|Any CPU.Build.0 = Release|Any CPU
{311FC5DB-E938-405C-ACA7-D74AC11B505E}.Release|ARM.ActiveCfg = Release|Any CPU
{311FC5DB-E938-405C-ACA7-D74AC11B505E}.Release|ARM.Build.0 = Release|Any CPU
{311FC5DB-E938-405C-ACA7-D74AC11B505E}.Release|ARM64.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -635,7 +634,6 @@ Global
{62642DB1-7FCF-455E-AAC0-7B9FE4764A5B}.Debug|x86.ActiveCfg = Debug|Any CPU
{62642DB1-7FCF-455E-AAC0-7B9FE4764A5B}.Debug|x86.Build.0 = Debug|Any CPU
{62642DB1-7FCF-455E-AAC0-7B9FE4764A5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62642DB1-7FCF-455E-AAC0-7B9FE4764A5B}.Release|Any CPU.Build.0 = Release|Any CPU
{62642DB1-7FCF-455E-AAC0-7B9FE4764A5B}.Release|ARM.ActiveCfg = Release|Any CPU
{62642DB1-7FCF-455E-AAC0-7B9FE4764A5B}.Release|ARM.Build.0 = Release|Any CPU
{62642DB1-7FCF-455E-AAC0-7B9FE4764A5B}.Release|ARM64.ActiveCfg = Release|Any CPU
Expand Down
6 changes: 0 additions & 6 deletions MediaManager/MediaManagerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ public bool IsInitialized
public Timer Timer { get; protected set; } = new Timer(TimerInterval);

public static double TimerInterval { get; set; } = 1000;
[Obsolete("Use StepSizeForward and StepSizeBackward properties instead.", true)]
public virtual TimeSpan StepSize
{
get => throw new NotImplementedException("This property is obsolete. Use StepSizeForwards and StepSizeBackwards properties instead.");
set => throw new NotImplementedException("This property is obsolete. Use StepSizeForwards and StepSizeBackwards properties instead.");
}

protected TimeSpan _stepSizeForward = TimeSpan.FromSeconds(10);
public virtual TimeSpan StepSizeForward
Expand Down
2 changes: 1 addition & 1 deletion MediaManager/Platforms/Android/Media/ID3Provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public async Task<object> ProvideVideoFrame(IMediaItem mediaItem, TimeSpan timeF
{
var metadataRetriever = await CreateMediaRetriever(mediaItem).ConfigureAwait(false);

image = metadataRetriever.GetFrameAtTime((long)(timeFromStart.TotalMilliseconds*1000));
image = metadataRetriever.GetFrameAtTime((long)(timeFromStart.TotalMilliseconds * 1000));

metadataRetriever.Release();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public override async Task Play(IMediaItem mediaItem, TimeSpan startAt, TimeSpan
{
BeforePlaying?.Invoke(this, new MediaPlayerEventArgs(mediaItem, this));


var mediaSource = stopAt.HasValue ? mediaItem.ToClippingMediaSource(stopAt.Value) : mediaItem.ToMediaSource();
MediaSource.Clear();
MediaSource.AddMediaSource(mediaSource);
Expand Down
3 changes: 0 additions & 3 deletions MediaManager/Platforms/Apple/AppleMediaManagerBase.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using AVFoundation;
using MediaManager.Library;
using MediaManager.Media;
using MediaManager.Notifications;
using MediaManager.Platforms.Apple.Media;
Expand Down
8 changes: 4 additions & 4 deletions MediaManager/Platforms/Ios/Media/MPMediaItemExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public static IMediaItem ToMediaItem(this MPMediaItem item)
UserRating = item.Rating,
Id = item.PersistentID.ToString()
};

if (item.ReleaseDate != null)
output.Date = (DateTime)item.ReleaseDate;

if (item.Artwork != null)
output.Image = item.Artwork.ImageWithSize(new CGSize(300, 300));

if (output.Date != null)
output.Year = output.Date.Year;
#elif TVOS
Expand All @@ -62,7 +62,7 @@ public static IMediaItem ToMediaItem(this MPMediaItem item)
#endif
return output;
}

public static IEnumerable<IMediaItem> ToMediaItems(this IEnumerable<MPMediaItem> items)
{
#if IOS
Expand Down
7 changes: 1 addition & 6 deletions MediaManager/Platforms/Ios/Media/MPMediaTypeExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MediaManager.Library;
using MediaManager.Library;
using MediaPlayer;

namespace MediaManager.Platforms.Ios.Media
Expand Down
1 change: 0 additions & 1 deletion MediaManager/Platforms/Uap/Media/StorageFileProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Windows.Storage.FileProperties;
using Windows.Storage.Streams;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media.Imaging;

namespace MediaManager.Platforms.Uap.Media
Expand Down
7 changes: 2 additions & 5 deletions MediaManager/Playback/IPlaybackManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,16 @@ namespace MediaManager.Playback

public interface IPlaybackManager : INotifyPropertyChanged
{
/// <summary>
/// Managing the step size for the step forward and step backward functions
/// </summary>
[Obsolete("Use StepSizeForward and StepSizeBackward properties instead.", true)]
TimeSpan StepSize { get; set; }
/// <summary>
/// Managing the step size for the step forward function
/// </summary>
TimeSpan StepSizeForward { get; set; }

/// <summary>
/// Managing the step size for the step backward function
/// </summary>
TimeSpan StepSizeBackward { get; set; }

/// <summary>
/// Reading the current status of the player
/// </summary>
Expand Down
1 change: 0 additions & 1 deletion Samples/ElementPlayer.Android/SplashScreen.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Android.App;
using Android.Content.PM;
using MvvmCross.Core;
using MvvmCross.Platforms.Android.Core;
using MvvmCross.Platforms.Android.Views;

Expand Down
3 changes: 1 addition & 2 deletions Samples/ElementPlayer.Core/ViewModels/HomeViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using MediaManager;
using MediaManager.Library;
Expand Down
10 changes: 1 addition & 9 deletions Samples/ElementPlayer.WPFCore/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace ElementPlayer.WPFCore
namespace ElementPlayer.WPFCore
{
/// <summary>
/// Interaction logic for App.xaml
Expand Down
1 change: 0 additions & 1 deletion Samples/ElementPlayer.WPFCore/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
Expand Down
4 changes: 1 addition & 3 deletions Samples/ElementPlayer.WPFCore/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Windows;

namespace ElementPlayer.WPFCore
namespace ElementPlayer.WPFCore
{
/// <summary>
/// Interaction logic for MainWindow.xaml
Expand Down

0 comments on commit 61e024a

Please sign in to comment.