Search Issue Tracker
Fixed in 2017.1.X
Votes
0
Found in
5.6.0f3
Issue ID
900348
Regression
No
Video Player does not play audio when rendered on RawImage component
Steps to reproduce:
1. Open "900348 repro.zip"
2. Enter play mode
3. Observe how video is playing (from ViewGO->OverlayCanvas->VideoImg gameobject) but audio is not
Expected result: Video and audio start playing after VideoPlayer.Prepare(); function finishes
Actual result: Video is played but there is no sound.
Reproduced on: 5.6.0p1
Did not reproduce on: 2017.1.0b1 (works as intended)
Workaround: use Render mode "Material Override" (as it is done on gameObject "VideoManager"). To enable the workaround, Disable VideoImg gameobject and enable VideoCamera gameobject (under Main Camera)
Note: TestVideo.cs script controls the video playback on VideoImg gameobject
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [macOS] Rendering Debugger Volume's "Component" dropdown is opened with a big offset when "Component" field is set to any "Sample Scene"
- [iOS] Metal API validation error thrown when MSAAx2 and Depth&Color Texture are enabled
- Pressing “Open” button in Inspector > “High Quality Lines” Override throws “Item m_RenderPipelineSettings.supportHighQualityLineRendering not found” warning
- Overlays are immediately undocked when the Overlay is docked to the right side of Scene View and the Overlay's Handle is clicked
- Crash in PhysicsManager::IgnoreCollision when a GameObject with “Is Trigger” enabled enters a collision in a specific project
sky-seto
Nov 21, 2017 11:12
The problem occurred when playing an mp4 video file with Unity 2017.2.0f3.
Set the value of "Controlled Tracks" to 1 from the inspector of Unity Editor.
VideoPlayer videoPlayer = GameObject.Find (..).GetComponent<VideoPlayer>();
AudioSource audioSource = GameObject.Find(..).GetComponent<AudioSource>();
videoPlayer.SetTargetAudioSource (0, audioSource);
videoPlayer.EnableAudioTrack (0, true);
videoPlayer.audioTrackCount always returns 0. It does not seem to be getting the correct value.
This problem was solved by this method.
After I open my project or edit scripts, Scene window sometimes turns purple color for a moment. The Game window has no problem.