Initial WPF Support (#385)
* initial support for WPF * update readme with WPF specific instructions * remove autogenerated .gitattributes file * reference RNW NPM package instead of hard-coded local reference
This commit is contained in:
committed by
Matt Apperson
parent
d48d7efc5d
commit
ebc6617ba4
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using static System.FormattableString;
|
||||
|
||||
namespace ReactNativeVideo
|
||||
{
|
||||
static class ReactVideoEventTypeExtensions
|
||||
{
|
||||
public static string GetEventName(this ReactVideoEventType eventType)
|
||||
{
|
||||
switch (eventType)
|
||||
{
|
||||
case ReactVideoEventType.LoadStart:
|
||||
return "onVideoLoadStart";
|
||||
case ReactVideoEventType.Load:
|
||||
return "onVideoLoad";
|
||||
case ReactVideoEventType.Error:
|
||||
return "onVideoError";
|
||||
case ReactVideoEventType.Progress:
|
||||
return "onVideoProgress";
|
||||
case ReactVideoEventType.Seek:
|
||||
return "onVideoSeek";
|
||||
case ReactVideoEventType.End:
|
||||
return "onVideoEnd";
|
||||
case ReactVideoEventType.Stalled:
|
||||
return "onPlaybackStalled";
|
||||
case ReactVideoEventType.Resume:
|
||||
return "onPlaybackResume";
|
||||
case ReactVideoEventType.ReadyForDisplay:
|
||||
return "onReadyForDisplay";
|
||||
default:
|
||||
throw new NotSupportedException(
|
||||
Invariant($"No event name added for event type '{eventType}'."));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user