ok
CHOOSE YOUR LANGUAGE

Play Media Behavior

General Rules
Media: Video

Media: Audio
Media: Image
Case Study

 

NOTE: The Play Media Behavior's defination will be launched after v1.0.3.20170821.  

 

General Rules 


Children blocks will run within duration set on parent block.

If children blocks are running half-way when duration set on parent block has completed, Zenbo will stop the action currently performed.

 

 

 

 

 

If there are other Play Media (Non-Blocking) blocks as the children blocks, the duration will be referred as playing duration of that media. If the parent block duration has reached, the children blocks will stop, even if it’s not finished yet.
 

 

 

 

 

 

 

 

 

Media: Video 


Screen Output
If after the video has finished playing, and there’s still time left. Screen will show the block that uses screen (eg. Face Expression, Take Picture, Show Picture, etc.). If no other blocks that requires screen, screen will be Zenbo default face expression.

Audio Output
Block that ONLY produces audio (eg. Speech, Play Recorded Audio, Play Media [Audio]) can run simultaneously with parent block.

 

 

 

Blocks that cannot run simultaneously:

  • Play Media (Blocking/Non-Blocking) [Image/Video]
  • Play Music with Image (Blocking/Non-Blocking)
  • Video Recording
  • Play Recorded Video
  • Take Picture
  • Show Took Picture
  • GridView/ListView

These blocks will only run after video file in parent block has finished playing and there is remaining time.
 

 

 

Media: Audio 


 

Blocks that use audio can run simultaneously with Play Media (Non-Blocking) [Audio] block. Eg. Speak, GridView/ListView, Take Picture, etc.
 

 

 

 

 

 

Media: Image 


Blocks that use screen output cannot run simultaneously with Play Media (Non-Blocking) [Image] block.

 

 

 

Blocks that cannot run simultaneously:

  • Play Media (Blocking/Non-Blocking) [Image/Video]
  • Play Music with Image (Blocking/Non-Blocking)
  • Take Picture
  • Show Took Picture
  • Video Recording
  • Play Recorded Video
  • GridView/ListView

These blocks will not run at all.

 

Case Study 


Here is the scenario of the blocks arrangement. Refer to next slide for block execution behavior.

 

 

 

 

 

 

 

 

 

 

 

 

 

How the block runs

Instead of following the sequence how they were arranged, they will be arranged based on output and run simultaneously. However, there are other rules that might affect this behavior.

 

  

Under Screen Output, there is Face Expression aside from Play Media.

If the video file duration is shorter than 5 seconds, the remaining duration can be used to show Face Expression.

If the video file duration is/more than 5 seconds, the Face Expression will not be shown at all.
 

 

 

 

 

If there are blocks that is set to “Blocking” type, the blocks below will not run until that block can be run.

In this case, run the blocks as below:

  • Play Media (Non-Blocking) plays & Body Movement runs
  • When Play Media (Non-Blocking) finishes, shows Face Expression & continues Body Movement (or add to previous Body Movement, if previous Body Movement is not finished yet)
  • After the 2nd Body Movement completed, light up Wheel LED at Non-Blocking
     
Go To Top