Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Seek video
Started by novelda76 Jan 21 2019 02:23 AM

No replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

novelda76

[GLOBAL: userInfoPane.html]
novelda76
  • Observer

  • 14 posts
  • Corona SDK

Hi, i have a 7 seconds video in my app. I want to play this video from the beginning to the end and then loop forever the video from second 3 to the end, but the video is looping from start and not from second three. Here's my code

 

video_040:load( "assets/videos/cargoship_compressed.mp4" )
video_040:play()
 
local function videoListener(event)
        if event.phase == "ended" then
                      video_040:seek(3)  --rewind video after play
                      video_040:play()
          end
      end
video_040:addEventListener( "video", videoListener)



[topic_controls]
[/topic_controls]