Video Stop Method Delta Engine Documentation

Namespace: DeltaEngine.Multimedia
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void Stop()
Remarks

Tests: DeltaEngine.Multimedia.Tests.VideoTests
Examples

3 unit tests call DeltaEngine.Multimedia.Video.Stop
[Test]
public void PlayAndStop()
{
    testVideo.Stop();
    Assert.IsFalse(testVideo.IsPlaying());
    testVideo.Play();
    Assert.IsTrue(testVideo.IsPlaying());
}
[Test]
public void PlayAndStopWithEntitiesRunner()
{
    int startedNumberOfEntities = EntitiesRunner.Current.NumberOfEntities;
    Assert.AreEqual(startedNumberOfEntities, EntitiesRunner.Current.NumberOfEntities);
    testVideo.Stop();
    Assert.AreEqual(startedNumberOfEntities, EntitiesRunner.Current.NumberOfEntities);
    testVideo.Play();
    Assert.AreEqual(startedNumberOfEntities + 1, EntitiesRunner.Current.NumberOfEntities);
    testVideo.Stop();
    Assert.AreEqual(startedNumberOfEntities, EntitiesRunner.Current.NumberOfEntities);
}
[Test]
public void StartAndStopVideo()
{
    Assert.AreEqual(3.791f, testVideo.DurationInSeconds, 0.5f);
    var videoTester = new VideoPlayedOneSecondTester(testVideo);
    Assert.IsTrue(videoTester.IsPauseable);
    testVideo.Play();
}
See Also