This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Javier Eduardo Treviño
Posted Oct 11 - Read on Facebook

How can I make a video play and stop on a Tap Event? Also is it possible to store the functions inside states so it just cycles states onTap? here's my code

Malta = new VideoLayer
width: 408
video: "images/EF%20-%20My%20summer%20in%20Malta%20(720p).mp4"
height: 240
x: 0
y: 0
opacity: 0
z: 5
perspective: 100

Malta.states =
a:
html: Malta.player.play()
b:
html: Malta.player.pause()

playIcon.index = 1
playIcon.parent = Malta

playIcon.onTap ->
Malta.stateCycle()
Malta.opacity = 1