* [MediaPlayer] Fix not to set callback in case of using MedaiStreamSource
when source is MediaStreamSource, ObjectKeeper is not active.
so garbage collector sometimes collects callback in use.
this patch is to avoid that case.
* fix not to set cb for case of MediaStreamSource
* fix to follow coding rules
using (var cbKeeper = ObjectKeeper.Get(cb))
{
- NativeSetPlayPosition(position, accurate, nanoseconds, cb);
+ NativeSetPlayPosition(position, accurate, nanoseconds, immediateResult ? null : cb);
+
if (immediateResult)
{
taskCompletionSource.TrySetResult(true);
}
-
await taskCompletionSource.Task;
}
}