Author Topic: [HELP] Snaps Mute  (Read 54 times)

arthurvalenca

  • Full Member
  • ***
  • Posts: 73
    • View Profile
[HELP] Snaps Mute
« on: December 03, 2019, 09:21:35 AM »
Hello everyone I have a code that I will put below, but I have difficulty leaving the videos mute, would anyone have any idea for me to be able to mute?

Code: [Select]
###########
## Snaps ##
###########

::OBJECTS1 <- {
artwork_videotheme = fe.add_artwork("snap", x*0.396, y*0.1675, w*0.2085, h*0.510),
}

OBJECTS1.artwork_videotheme.visible=false;

::videoSound <- Vid.NoAudio;
OBJECTS1.artwork_videotheme.video_flags = Vid.NoAudio;

local settings = {
   delay_timer = 0,
   play_delay = 1600,
   stop_play = 235000,
}

function on_transition_videotheme( ttype, var, ttime ) {
 switch ( ttype ) {
  case Transition.StartLayout:
  case Transition.ToNewSelection:
  case Transition.ToNewList:
  case Transition.EndNavigation:
        OBJECTS1.artwork_videotheme.video_flags = Vid.NoAutoStart;
        settings.delay_timer = fe.layout.time;
        OBJECTS1.artwork_videotheme.visible=false;
       break;
  }
 return false;
}

fe.add_transition_callback( "on_transition_videotheme" );

function on_tick_videotheme(tick_time) {
   if ( !OBJECTS1.artwork_videotheme.video_playing && tick_time - settings.delay_timer >= settings.play_delay ) {
   
        OBJECTS1.artwork_videotheme.video_playing = true;
       
        ::videoSound <- Vid.Default;
        OBJECTS1.artwork_videotheme.video_flags = Vid.Default;       
       
        OBJECTS1.artwork_videotheme.visible=true;
       
        OBJECTS1.artwork_videotheme.alpha = 0
        local alpha_artwork_videotheme_0 = {
        property = "alpha", start = 0 end = 255, time = 2000 easing = Easing.Out,
        }
 
        animation.add( PropertyAnimation( OBJECTS1.artwork_videotheme, alpha_artwork_videotheme_0 ) );
       
    }
   
    else if ( tick_time - settings.delay_timer >= settings.stop_play ) {
       
        OBJECTS1.artwork_videotheme.visible=false;
       
    }   
}

fe.add_ticks_callback(this, "on_tick_videotheme");

jedione

  • Hero Member
  • *****
  • Posts: 797
  • punktoe
    • View Profile
Re: [HELP] Snaps Mute
« Reply #1 on: December 03, 2019, 04:19:22 PM »
i see that u already have the  ".video_flags = Vid.NoAudio" in use

i think that it might be with using the visible = true  or false

i have found this a problem for me when trying to use in an animation,   with signals.   

sorry cant help.  but watching.

thinking....



help a friend....