Jump to content


Photo

HTML5 Video Control Extension


  • Please log in to reply
2 replies to this topic

#1 ShadeSpeed

ShadeSpeed

    Procedural Generation King

  • GMC Member
  • 771 posts
  • Version:GM:Studio

Posted 12 May 2015 - 01:19 PM

HTML5 VIDEO CONTOL

JAVASCRIPT EXTENSION

 

$4.99

SALE: $0.99

 

1431440580_large.jpg?1431440580

 

Spoiler

 

Hi all,

 

I've created an extension which allows you to create videos in HTML5, then control them, retrieve variables, style them (reposition, resize, etc), and destroy them.

 

Marketplace Link: https://marketplace....5-video-control

 

Extension Functions:

video_create();
// Creates a new video in the web page, and returns an ID, used to refer to this video in other functions
 
video_all();
// Returns a JSON array of all existing video IDs
 
video_destroy(id);
// Destroys a video
 
video_exists(id);
// Returns [bool] true if video exists, false if it doesn't
 
video_set_source(url);
// Sets a videos URL source
 
video_get_source(id);
// Returns the videos source
 
video_can_play(video_id, type);
// Refer to http://www.w3schools.com/tags/av_met_canplaytype.asp, returns 2 for 'probably', 1 for 'maybe' else 0.
 
video_load(id);
// Loads a video
 
video_play(id);
// Plays a video
 
video_pause(id);
// Pauses a video
 
video_set_playback_rate(id, rate);
// Sets the playback speed [int], either 1 (100%), 0.5 (50%), 2 (200%), -1 (reverse 100%), -0.5 (reverse 50%)
 
video_get_playback_rate(id);
// Returns the current playback rate, either 1, 0.5, 2, -1, -0.5
 
video_set_loop(id, [bool] true / false);
// Sets whether to loop the video when it completes (returns to start, and plays again)
 
video_get_loop(id);
// Returns whether the video is set to loop
 
video_get_ended(id);
// Returns whether the video has ended or not [bool]
 
video_controls_visible(id);
// Returns 1 if the videos controls are visible, 0 if not
 
video_show_controls(id);
// Shows a videos controls
 
video_hide_controls(id);
// Hides a videos controls
 
video_set_volume(id, volume);
// Sets the videos volume, between 0 and 1 (0=0%, 1=100%)
 
video_get_volume(id);
// Returns the videos volume (0=0%, 1=100%)
 
video_get_duration(id);
// Returns the videos duration in seconds
 
video_get_current_time(id);
// Returns the current time within the video, in seconds
 
video_set_current_time(id);
// Sets the current time in the video, in seconds
 
video_get_played(id);
// Returns a JSON array of the time ranges that have been played. Refer to: http://www.w3schools.com/tags/av_prop_played.asp
 
video_get_buffered(id);
// Returns a JSON array of time ranges that have been buffered. Refer to: http://www.w3schools.com/tags/av_prop_buffered.asp
 
video_set_alpha(id, alpha);
// Sets the videos alpha (transparency), between 0 (fully transparent) and 1 (fully opaque)
 
video_set_x(id, x [string]);
// Sets the videos X position value, to either a pixel value (I.E "15px"), a percentage value ("10%"), or any other HTML measurement
 
video_set_y(id, y [string]);
// Sets the videos Y position value, to either a pixel value (I.E "15px"), a percentage value ("10%"), or any other HTML measurement
 
video_set_height(id, height [string]);
// Sets the videos height value, to either a pixel value (I.E "256px"), a percentage value ("80%"), or any other HTML measurement
 
video_set_width(id, width [string]);
// Sets the videos width value, to either a pixel value (I.E "256px"), a percentage value ("80%"), or any other HTML measurement
 
video_show(id);
// Shows a video
 
video_hide(id);
// Hides a video
 
video_set_zindex(video_id, zindex);
// Sets the zIndex of the video (similar to Game Maker layers, in HTML documents) [int]
 
video_set_position(video_id, position);
// Sets the position of the video, to a CSS string 
 

I hope you enjoy it!

 

Thanks,

 

Dan.


Edited by ShadeSpeed, 15 May 2015 - 10:22 AM.

  • 4

Marketplace Resources

 

code.png page.png video.png


#2 gordonbleu

gordonbleu

    GMC Member

  • New Member
  • 14 posts
  • Version:GM:Studio

Posted 08 July 2015 - 11:18 PM

Hi there

I have purchase this extension but cannot get it to work. it seems it is missing all its functions. can you check the package as it is only about  3k which seems wrong, I don't want to give it a 1 star rating but am a bit frustrated. and before you ask - yes I have put obj_example in the room


  • 0

#3 carnotaurus

carnotaurus

    GMC Member

  • New Member
  • 12 posts
  • Version:GM:Studio

Posted 24 November 2015 - 01:28 PM

What he said ^

 

I purchased this and it appears to include none of the scripts.


  • 0