Player Object with Alpha Channel - Video Playback with Preserved Transparency

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
okk
Posts: 176
Joined: Wed Feb 04, 2015 11:37 am

Player Object with Alpha Channel - Video Playback with Preserved Transparency

Post by okk » Mon Feb 26, 2024 9:37 am

Hi all,
does anyone have experience with the playerobject and video content with transparency? My target platforms are Android and iOS. My ultimate goal is to have my videos playback within a hexagonal shape. Think of it like hexagonal tiles in a bathroom. When you click a tile, a video should play within the shape of that tile.

Since the playerobject is always drawn on top of the card, my current thinking is to create the hexagonal shape in my video editing software, export the video with an alpha channel to simulate the hexagonal mask. I have tried with a webM video that can preserve transparency and a H.265 video on Android, the video plays back just fine, but no transparency is preserved. It would be of course much easier if I could draw the mask within livecode itself on top of the video, but I haven't found a solution for that either. Any tips would be welcome.

Thanks,
Oliver

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Player Object with Alpha Channel - Video Playback with Preserved Transparency

Post by richmond62 » Mon Feb 26, 2024 9:42 am

Of course you could convert your movie file to an animated GIF file and then set that as the backGroundPattern of a hexagonal graphic.

Blast: strike that: the animated GIF will NOT animate as the backGroundPattern of a graphic. :(

A windowShape mask in a stack will NOT crop a movie player:
-
SShot 2024-02-26 at 11.10.06.png
-
SShot 2024-02-26 at 11.10.17.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Player Object with Alpha Channel - Video Playback with Preserved Transparency

Post by richmond62 » Mon Feb 26, 2024 10:15 am

This could have been done in a pre-8.1 version of LiveCode, before Quicktime support was dropped.

Although LC 8.0 starts up on MacOS 14.4 it crashes before the IDE is loaded.

okk
Posts: 176
Joined: Wed Feb 04, 2015 11:37 am

Re: Player Object with Alpha Channel - Video Playback with Preserved Transparency

Post by okk » Mon Feb 26, 2024 5:06 pm

Hi and thanks for trying. I guess the good old "always buffer" is working as expected times are not coming back... I think it never worked on mobile though. Still searching, not overly optimistic. Best. Oliver

Post Reply

Return to “Multimedia”