Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fe.image.video_playing freezes Attract Mode when set twice as TRUE #407

Closed
oomek opened this issue Jan 7, 2018 · 3 comments
Closed

fe.image.video_playing freezes Attract Mode when set twice as TRUE #407

oomek opened this issue Jan 7, 2018 · 3 comments

Comments

@oomek
Copy link
Collaborator

oomek commented Jan 7, 2018

I've identified 2 issues with video_playing property in image class

  1. When you set it to FALSE when snap video is playing it stops but the state of video_playing is still TRUE
  2. When you set it to TRUE while video is playing the whole AM gets frozen.

Example code below:

local flw = fe.layout.width
local flh = fe.layout.height

local snap = fe.add_artwork("snap", 0, 0, flw, flh)
snap.trigger = Transition.EndNavigation

local bar = fe.add_text("", 0, 0, 32, 1080)
bar.set_bg_rgb(255,255,255)

local debug = fe.add_text("", 0, 0, 200, 50)

function tick( tick_time )
{
	bar.x += 4
	if ( bar.x > flw ) bar.x = 0
	debug.msg = snap.video_playing
}

function signalHandler( signal_str ){
	switch( signal_str ){
		case "custom1":
			snap.video_playing = false
			return true
		case "custom2":
			snap.video_playing = true
			return true
	}
	return false
} 

fe.add_ticks_callback( "tick" )
fe.add_signal_handler( "signalHandler" )

@oomek
Copy link
Collaborator Author

oomek commented Jan 7, 2018

snap.video_playing is FALSE only when I set snap.video_flags = Vid.NoAutoStart
But again it stays TRUE after setting it once to TRUE

mickelson added a commit that referenced this issue Jan 9, 2018
- wasn't able to reproduce freezing reported in the issue, however
  I was able to fix the other incorrect behaviour reported
@oomek
Copy link
Collaborator Author

oomek commented Jan 10, 2018

Awesome! There is a proggress. The AM is not freezing anymore after setting video_playing = TRUE twice, but now setting video_playing = FALSE restarts the video. I can see the message turning false for a brief moment, but then it turns back to TRUE, so once it's playing I can no longer stop the video

@oomek
Copy link
Collaborator Author

oomek commented Jan 11, 2018

Great news, with your recent changes when I initiate the sleep from the layout and set the video_playing = FALSE just before that the layout does not freeze anymore on resume even though this command does not stop the video but restart it! It's still freezing when I press the power button. So I was thinking if you may know the way to intercept the sleep initiation and force stop all playing videos just before the computer goes to sleep?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants