Apparently you can use .ogv (video) files as textures on objects that support custom textures, such as laptop, TV, PC monitor or some notice boards. Until recently trying to use .ogv as object texture could result in crash, but not anymore. There are however a few things to remember, so it might not actually appear as attractive as it sounds.
1. BIS do not officially use/support this even though the functionality is there, so you are on your own (they did however fix the crash pretty quickly).
2. The sound in not positional and the volume is the same if you are next to the object or miles away.
3. You cannot stop the video once it started playing, but you can know when it is finished.
4. There is currently no way to make video to start on its own on the object, additional UI element must be used to trigger playback.
5. Depending on codec used you might have desync between video and sound.
Ok, here is working code you can just copy paste and start from here:
When you setObjectTexture on TV, no playback happens, but the texture is loaded. In order to start playback the same texture has to be loaded into RscPicture control, and not just any RscPicture control, but the one that has autoplay = 1; RscMissionScreen display has such control with idc 1100:
Not only this will start your playback automatically, it will also store display object in BIS_RscMissionScreen variable for later use. I’ve also added “VideoStopped” EH to close display. One thing I found out, this EH will start executing each frame after video stopped, so in order to make it execute only once, EH has to be removed or display has to be closed, and this is what I did.
What would I like to see in the future for this functionality? Commands objectTexturePlay and objectTextureStop so there is no need for UI trickery. Positional sound and some way of controlling it, like videoVolume and fadeVideo. Maybe some way of getting current time code of a video and ability to skip to desired time code when starting playback. Anyway, there are probably more important issues that needs to be addressed first, so for now…
P.S. BTW downloaded this big .ogv file and was able to play it, but I think it got out of sync towards the middle.