File: videotest.ssc

package info (click to toggle)
stellarium 25.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,307,224 kB
  • sloc: ansic: 317,377; cpp: 214,435; xml: 48,592; javascript: 26,073; python: 2,113; perl: 734; sh: 247; makefile: 192; pascal: 169
file content (25 lines) | stat: -rw-r--r-- 1,005 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Name: Video Test
// Author: Georg Zotti
// License: Public Domain
// Description: This script plays a video file and test some functionalities.
//              Note that video support is a build-time option and
//              may not be supported for the version of Stellarium
//              which you have.  Also, different platforms may
//              support different video formats.
//

// The video path name is relative to the scripts directory.
core.loadVideo("tests/media/stellarium.mp4", "vid", 100, 70, false);

lab = LabelMgr.labelScreen("Playing video file...", 100, 20, true, 20, "#ff0000");
core.wait(3);
core.playVideo("vid");
//core.showVideo("vid");
core.resizeVideo("vid", 0.3, -1); // resize to 1/3 of current width, keep original aspect ratio.
core.wait(1); // we need a short waiting period while video is playing to have valid values like duration!
dur=core.getVideoDuration("vid");
core.wait(dur/1000. + 2.);
LabelMgr.deleteLabel(lab);
core.wait(0.4);

core.dropVideo("vid");