diff --git a/docs/component-camera.md b/docs/component-camera.md index 5c8301c..4286353 100644 --- a/docs/component-camera.md +++ b/docs/component-camera.md @@ -4,7 +4,7 @@ title: Camera sidebar_label: Camera --- -Camera component is used to **take pictures**. +The Camera component is used to **take pictures**. ## Example @@ -24,16 +24,18 @@ Take a picture with the camera. ![take picture](assets/camera/take-picture.png) -| Type | Explanation | Required | -| ------ | ---------------- | -------- | -| Camera | Camera Component | Yes | +| Type | Explanation | Required | +| ------ | -------------------------| -------- | +| Camera | Targeted camera component| Yes | ## Events ### onPictureTaken -Triggered when the picture is taken. +The `onPictureTaken` event is triggered when a picture is taken by the user. + +**filePath** - The path where the picture is stored after the photo is being taken. ### onPictureTakenCancel -Triggered when the picture taking event is cancelled. +The `onPictureTakenCancel` event is triggered when the user cancels when taking a picture. diff --git a/docs/component-dialog.md b/docs/component-dialog.md index 009f51e..23bc148 100644 --- a/docs/component-dialog.md +++ b/docs/component-dialog.md @@ -8,7 +8,7 @@ Dialog is a popup that is often used to confirm user's action. ## Example -Create and show a dialog with the `title` and `message` with OK and Cancel button. +Create and show a dialog with the `title` and `message` with OK, Cancel, and a optional neutral button. ![example](assets/dialog/example.png) @@ -20,14 +20,14 @@ Create and show a dialog with the `title` and `message` with OK and Cancel butto ### setTitle -Set the title of the dialog. +Set the title of the selected dialog. ![set title](assets/dialog/set-title.png) -| Type | Explanation | Required | -| ------ | ------------------- | -------- | -| Dialog | Dialog Component | Yes | -| String | Title of the dialog | Yes | +| Type | Explanation | Required | +| ------ | -------------------------| -------- | +| Dialog | Targeted dialog component| Yes | +| String | Title of the dialog | Yes | ### setMessage @@ -35,52 +35,54 @@ Set the message of the dialog. ![set message](assets/dialog/set-message.png) -| Type | Explanation | Required | -| ------ | --------------------- | -------- | -| Dialog | Dialog Component | Yes | -| String | Message of the dialog | Yes | +| Type | Explanation | Required | +| ------ | -------------------------| -------- | +| Dialog | Targeted dialog component| Yes | +| String | Message of the dialog | Yes | ### OK Button Clicked -Add an OK button, and determine the action to perform when clicked. - +Adds an OK button, and determine the action to perform when the button is clicked. +**Action of the button will only be excuted within the block** ![ok button](assets/dialog/ok-button.png) -| Type | Explanation | Required | -| ------ | --------------------- | -------- | -| Dialog | Dialog Component | Yes | -| String | Text of the OK Button | Yes | +| Type | Explanation | Required | +| ------ | -------------------------| -------- | +| Dialog | Targeted dialog component| Yes | +| String | Text of the OK Button | Yes | ### Cancel Button Clicked -Add a Cancel button, and determine the action to perform when clicked. +Adds a Cancel button, and determine the action to perform when the button is clicked. +**Action of the button will only be excuted within the block** ![cancel button](assets/dialog/cancel-button.png) | Type | Explanation | Required | | ------ | ------------------------- | -------- | -| Dialog | Dialog Component | Yes | +| Dialog | Targeted dialog component | Yes | | String | Text of the Cancel Button | Yes | ### Neutral Button Clicked -Add a Neutral button, and determine the action to perform when clicked. +Adds a Neutral button, and determine the action to perform when the button is cilcked. +**Action of the button will only be excuted within the block** ![neutral button](assets/dialog/neutral-button.png) | Type | Explanation | Required | | ------ | -------------------------- | -------- | -| Dialog | Dialog Component | Yes | +| Dialog | Targeted dialog component | Yes | | String | Text of the Neutral Button | Yes | ### Show -Show the created dialog. Note that the dialog will not show without this block. +Show the created dialog. **Note that the dialog will not show without this block.** ![show](assets/dialog/show.png) -| Type | Explanation | Required | -| ------ | ---------------- | -------- | -| Dialog | Dialog Component | Yes | +| Type | Explanation | Required | +| ------ | ------------------------ | -------- | +| Dialog | Targeted dialog component| Yes | diff --git a/docs/component-filepicker.md b/docs/component-filepicker.md index e911a97..79c15d3 100644 --- a/docs/component-filepicker.md +++ b/docs/component-filepicker.md @@ -4,7 +4,7 @@ title: FilePicker sidebar_label: FilePicker --- -FilePicker component is used to **pick files from the device**. +FilePicker component is used to **pick files from the device storage, MicroSD card and from the cloud (Google drive, Dropbox and etc)**. The FilePicker component can also filter on what type of files the user can pick using the MIME filter. ## Example @@ -20,20 +20,21 @@ Picking files from the device. ### pick files -Pick files from the device. +This block triggers the file picker. ![pick files](assets/filepicker/pick-files.png) -| Type | Explanation | Required | -| ---------- | --------------------- | -------- | -| FilePicker | File Picker Component | Yes | +| Type | Explanation | Required | +| ---------- | ------------------------------- | -------- | +| FilePicker | Targeted File Picker component | Yes | ## Events ### onFilesPicked -Triggered when the file is picked. +This event triggers when the user has successfully picked a file from the file picker +**filePath (List string)** - The file path(s) where the user has selected -### onPictureTakenCancel +### onFilesPickedCancel -Triggered when the file pick event is cancelled. \ No newline at end of file +This event triggers when the user did not pick a file successfully. \ No newline at end of file diff --git a/docs/component-firebase-auth.md b/docs/component-firebase-auth.md index 99a6433..5935165 100644 --- a/docs/component-firebase-auth.md +++ b/docs/component-firebase-auth.md @@ -4,11 +4,13 @@ title: Firebase Auth sidebar_label: Firebase Auth --- -Firebase Auth component is used to authenticate users. +Firebase Auth component is used to authenticate users. It also ensures that users are only accessible to certain data. -## Example +## Examples and uses -Creating a new user with given username and password. +- Creating a new user with given username and password. +- Logging in an existing user +- Making sure users recevive the correct infomation ![example](assets/component-firebase-auth/example.png) @@ -20,70 +22,70 @@ Creating a new user with given username and password. ### create user with email and password -Create a new user with given email and password. +The 'create user with email and password' block creates a new user on the Firebase database using the E-mail and password given by the user. ![create user](assets/component-firebase-auth/create-user.png) -| Type | Explanation | Required | -| ------------- | ----------------------- | -------- | -| Firebase Auth | Firebase Auth Component | Yes | -| String | Email | Yes | -| String | Password | Yes | +| Type | Explanation | Required | +| ------------- | -------------------------------- | -------- | +| Firebase Auth | Targeted Firebase Auth component | Yes | +| String | User E-mail | Yes | +| String | User password | Yes | ### sign in user with email and password -Sign in a user with given email and password. +The 'sign in user with email and password' block signs the user in the app by checking against the Firebase database. ![sign in user](assets/component-firebase-auth/sign-in.png) -| Type | Explanation | Required | -| ------------- | ----------------------- | -------- | -| Firebase Auth | Firebase Auth Component | Yes | -| String | Email | Yes | -| String | Password | Yes | +| Type | Explanation | Required | +| ------------- | -------------------------------- | -------- | +| Firebase Auth | Targeted Firebase Auth component | Yes | +| String | User E-mail | Yes | +| String | User password | Yes | ### sign in anonymously -Sign in a user with an anonymous credential. +The 'sign in anonymously' block signs in the user without any login infomation or registration needed. ![sign in anonymously](assets/component-firebase-auth/sign-in-anonymously.png) -| Type | Explanation | Required | -| ------------- | ----------------------- | -------- | -| Firebase Auth | Firebase Auth Component | Yes | +| Type | Explanation | Required | +| ------------- | -------------------------------- | -------- | +| Firebase Auth | Targeted Firebase Auth component | Yes | ### is logged in -True if logged in. +The 'is logged in' boolean will return a True if the user has been authenticated via Firebase, otherwise it will return a False. ![is logged in](assets/component-firebase-auth/is-logged-in.png) ### get email -Retrieve the email of the current user. +The 'get email' block retrieves the e-mail address of the current user. ![get email](assets/component-firebase-auth/get-email.png) ### get Uid -Retrieve the unique identification of the current user. +The 'get Uid' block retrieves the unique identification (Uid) of the current user. ![get uid](assets/component-firebase-auth/get-uid.png) ### send password reset email to -Send a password reset email to the given email. +The 'send password reset email to' block sends a password reset e-mail to the given e-mail address. ![create user](assets/component-firebase-auth/send-password-reset.png) -| Type | Explanation | Required | -| ------------- | ----------------------- | -------- | -| Firebase Auth | Firebase Auth Component | Yes | -| String | Email address | Yes | +| Type | Explanation | Required | +| ------------- | -------------------------------- | -------- | +| Firebase Auth | Targeted Firebase Auth component | Yes | +| String | Email address | Yes | ### sign out -Sign out the logged in user. +The 'sign out' block logs the user out from the app and deletes its infomation from the app data ![sign out](assets/component-firebase-auth/sign-out.png) @@ -91,12 +93,15 @@ Sign out the logged in user. ### onCreateUserComplete -Triggered after create user block is used. +The 'onCreateUserComplete' event triggers when Firebase auth finishes attampting to create a new user in the database. +**Success (Boolean)** - Tells whether the user creation was successful. True if the user was created successfully, otherwise False +**errorMessage (String)** - The error message can be retrived here if the user creation was not successful. -### onSignInUserComplete - -Triggered after sign in user block is used. +### onLogInUserComplete +The 'onLogInUserComplete' event triggers when Firebase auth finishes attampting to log in an user using the database. +**Success (Boolean)** - Tells whether the user log-in was successful. True if the user was created successfully, otherwise False +**errorMessage (String)** - The error message can be retrived here if the user log-in was not successful. ### onResetPasswordEmailSent -Triggered after reset password block is used. \ No newline at end of file +The 'onResetPasswordEmailSent' event triggers when a password reset E-Mail has been sent to the selected E-mail address. \ No newline at end of file diff --git a/docs/component-firebase-db.md b/docs/component-firebase-db.md index 117be3e..7c9febe 100644 --- a/docs/component-firebase-db.md +++ b/docs/component-firebase-db.md @@ -4,14 +4,18 @@ title: Firebase DB sidebar_label: Firebase DB --- -Firebase DB is an online, real-time database used to store and read data. +Firebase DB is an online, real-time database used to store and read **text data**. ## Example -Creating and saving a post information on Firebase Database. +- Creating and saving a post information on Firebase Database. ![example](assets/component-firebase-database/example.png) +## Other uses +- Saving usernames with emails +- Get data from a centralised area with constant updates from other users. +
-------------------- @@ -20,40 +24,40 @@ Creating and saving a post information on Firebase Database. ### add key value -Add data to Firebase Database with key-value format. +The 'add key value' block adds data into the Firebase database ![add key value](assets/component-firebase-database/add-key-value.png) | Type | Explanation | Required | | ----------------- | --------------------------------------- | -------- | -| Firebase Database | Firebase Database Component | Yes | +| Firebase Database | Targeted Firebase Database Component | Yes | | String | Key of the value you are trying to save | Yes | | Map | Map of values | Yes | ### push value -Push data to Firebase Database with a generated unique random key. +The 'push value' block pushes data to Firebase Database with a generated Unique Identification Key (UID). ![push value](assets/component-firebase-database/push-value.png) -| Type | Explanation | Required | -| ----------------- | --------------------------- | -------- | -| Firebase Database | Firebase Database Component | Yes | -| Map | Map of values | Yes | +| Type | Explanation | Required | +| ----------------- | ------------------------------------ | -------- | +| Firebase Database | Targeted Firebase Database Component | Yes | +| Map variable | Map containing values | Yes | ### push getKey -Generate a unique random key. +The 'push getKey' block generates a unique random key. ![get key](assets/component-firebase-database/push-get-key.png) -| Type | Explanation | Required | -| ----------------- | --------------------------- | -------- | -| Firebase Database | Firebase Database Component | Yes | +| Type | Explanation | Required | +| ----------------- | ------------------------------------ | -------- | +| Firebase Database | Targeted Firebase Database Component | Yes | ### delete key -Delete the data from the Databse with the given key. +The 'delete key' block deletes the data from the Databse with the given key. ![delete key](assets/component-firebase-database/delete-key.png) @@ -62,52 +66,59 @@ Delete the data from the Databse with the given key. | Firebase Database | Firebase Database Component | Yes | | String | Key of the value you are trying to delete | Yes | -### get children to then +### get children to --- then -Retrieve the value to List Map, then perform additional action. +The 'get children to ---then' block retrieves the values from a Firebase database and transfers it to a List Map, then performs additional action if required. ![get children to then](assets/component-firebase-database/get-children-then.png) -| Type | Explanation | Required | -| ----------------- | --------------------------- | -------- | -| Firebase Database | Firebase Database Component | Yes | -| List Map | List Map variable | Yes | +| Type | Explanation | Required | +| ----------------- | ------------------------------------ | -------- | +| Firebase Database | Targeted Firebase Database Component | Yes | +| List Map | Targeted List Map variable | Yes | ### start listening -Start listening to changes in the database. The component starts listening by default. Only used after stopping the listener. +The 'start listening' block starts listening to changes in the Firebase database. The component starts listening by default. Only used listening is turned off manually. ![start listening](assets/component-firebase-database/start-listening.png) -| Type | Explanation | Required | -| ----------------- | --------------------------- | -------- | -| Firebase Database | Firebase Database Component | Yes | +| Type | Explanation | Required | +| ----------------- | ------------------------------------ | -------- | +| Firebase Database | Targeted Firebase Database Component | Yes | ### stop listening -Stop listening to the changes in the database. +The 'stop listening' block stops listening to the changes in the database. ![stop listening](assets/component-firebase-database/stop-listening.png) -| Type | Explanation | Required | -| ----------------- | --------------------------- | -------- | -| Firebase Database | Firebase Database Component | Yes | +| Type | Explanation | Required | +| ----------------- | ------------------------------------ | -------- | +| Firebase Database | Targeted Firebase Database Component | Yes | ## Events ### onChildAdded -Triggered when a new child value is added. - -### onChildChnaged +The 'onChildAdded' event is triggered when a new child value is added to the database. +**childKey (string)** - The key of the added child. +**Map: childValue** - A map containing the details about the added child. -Triggered when any value in children has changed. +### onChildChanged +The 'onChildChanged' event is triggered when any value in the children within the list has been changed. +**childKey (string)** - The key of the changed child. +**Map: childValue** - A map containing the details about the modified child. ### onChildRemoved -Triggered when a child is removed from reference. +The 'onChildRemoved' event is triggered when a child is removed from reference. +**childKey (string)** - The key of the removed child. +**Map: childValue** - A map containing the details about the removed child. ### onCancelled -Triggered when any read or write action is cancelled. \ No newline at end of file +The 'onCancelled' event is triggered when any read or write action is cancelled. +**errorCode (number)** - The error code of the given error. +**errorMessage (string)** - A string containing the message of the error. diff --git a/docs/component-firebase-storage.md b/docs/component-firebase-storage.md index 63b3a29..c3cac37 100644 --- a/docs/component-firebase-storage.md +++ b/docs/component-firebase-storage.md @@ -5,6 +5,7 @@ sidebar_label: Firebase Storage --- Firebase Storage component is used to save and download files from an online storage. +It is used to store all kinds of data like images and sound files. ## Example @@ -12,6 +13,10 @@ Uploading an image file after using Camera component to take a picture. ![example](assets/component-firebase-storage/example.png) +## Other uses +- Store files picked using FilePicker +- Store app/game assets to make app size smaller +
-------------------- @@ -20,62 +25,67 @@ Uploading an image file after using Camera component to take a picture. ### upload file -Upload file to path with the given name. +The 'Upload file' block upload a local path given into the firebase server. ![upload file](assets/component-firebase-storage/upload-file.png) -| Type | Explanation | Required | -| ---------------- | ------------------------------- | -------- | -| Firebase Storage | Firebase Storage Component | Yes | -| String | Path to the file to be uploaded | Yes | -| String | Name to save the file as | Yes | +| Type | Explanation | Required | +| ---------------- | ----------------------------------- | -------- | +| Firebase Storage | Targeted Firebase Storage Component | Yes | +| String | Path to the file to be uploaded | Yes | +| String | Name to save the file as | Yes | ### download file -Download file from url to given path. +The 'Download file' block downloads files with the given remote firebase directory path into a given local path. ![download file](assets/component-firebase-storage/download-file.png) -| Type | Explanation | Required | -| ---------------- | -------------------------- | -------- | -| Firebase Storage | Firebase Storage Component | Yes | -| String | URL of the file | Yes | -| String | Path to save the file to | Yes | +| Type | Explanation | Required | +| ---------------- | ----------------------------------- | -------- | +| Firebase Storage | Targeted Firebase Storage Component | Yes | +| String | URL of the file | Yes | +| String | Path to save the file to | Yes | ### delete file -Delete file at the given Firebase Storage URL. +The 'Delete file' block deletes a file using the given remote Firebase directory path. ![delete file](assets/component-firebase-storage/delete-file.png) -| Type | Explanation | Required | -| ---------------- | ----------------------------------- | -------- | -| Firebase Storage | Firebase Storage Component | Yes | -| String | URL of the file in Firebase Storage | Yes | +| Type | Explanation | Required | +| ---------------- | -------------------------------------------- | -------- | +| Firebase Storage | Targeted Firebase Storage Component | Yes | +| String | URL of the file in Firebase Storage | Yes | ## Events ### onFailure -Triggered when the file failed to upload or download. +The 'onFailure' event triggers when an error is encountered with uploading or downloading a file from the Firebase storage database. +**message (string)** - The error supplied from the service when the error occured ### onUploadSuccess -Triggered when the file successfully uploaded. +The 'onUploadSuccess' event triggers when the file/s were successfully uploaded into the Firebase storage database. +**downloadUrl (string/link)** - The path of the recently uploaded file. ### onUploadProgress -Triggered when the file starts uploading. +The 'onUploadProgress' event triggers when the file starts uploading or if there is a change in the upload progress. +**progressValue (integer)** - The current progress state of the uploading file. ### onDownloadProgress -Triggered when the file starts downloading. +The 'onDownloadProgress' event triggers when the file starts downloading or there os a change in the download progress. +**progressValue (integer)** - The current progress state of the downloading file. ### onDownloadSuccess -Triggered when the file successfully downloaded. +The 'onDownloadSuccess' event triggers when the file successfully downloaded from the Firebase storage database. +**totalByteCount (integer)** - The downloaded file size in bytes. ### onDeleteSuccess -Triggered when the file is successfully deleted. \ No newline at end of file +The 'onDeleteSuccess' event triggers when the file is successfully deleted from the Firebase storage database. \ No newline at end of file diff --git a/docs/component-gyroscope.md b/docs/component-gyroscope.md index b3397b5..9e2d1ae 100644 --- a/docs/component-gyroscope.md +++ b/docs/component-gyroscope.md @@ -6,8 +6,15 @@ sidebar_label: Gyroscope Gyroscope component is used to read gyroscopic values from the device. +## Other uses +- get phone axis for a 3D stuff (Perhaps??) +- Make a game with motion control + ## Events ### onSensorChanged -Triggered when the gyroscopic sensor is changed. +The 'onSensorChanged' event triggers when the postion of the gyroscopic sensor is changed. +**x (integer)** - The updated x-axis of the sensor. +**y (integer)** - The updated y-axis of the sensor. +**z (integer)** - The updated z-axis of the sensor. diff --git a/docs/component-intent.md b/docs/component-intent.md index 2dc830d..74ecaeb 100644 --- a/docs/component-intent.md +++ b/docs/component-intent.md @@ -4,7 +4,7 @@ title: Intent sidebar_label: Intent --- -An Intent is a messaging object you can use to request an action from another app component. You can use the Intent component to **start a new acitivity** or **pass data to another activity**. +An Intent is a messaging object you can use to request an action from another app component. You can use the Intent component to **start a new acitivity** or **pass data to another activity or app**. ## Example @@ -12,6 +12,10 @@ Set of blocks to start another activity while passing the data of `someValue` wi ![example](assets/intent/example.png) +## Other uses +- Open a external app +- Send data (E-mail, SMS) to a application that supports it +
-------------------- @@ -24,37 +28,37 @@ Used to point to the location of a data object (like a file for example), while ![set data](assets/intent/set-data.png) -| Type | Explanation | Required | -| ------ | -------------------------------------------------------------------------------------------------------------------- | -------- | -| Intent | Intent Component | Yes | +| Type | Explanation | Required | +| ------ | ------------------------------------------------------------ | -------- | +| Intent | Targeted intent component | Yes | | String | Data to transfer to next activity. Read more [here](https://developer.android.com/guide/components/intents-filters). | No | ### setScreen -Sets the screen to navigate to. +The 'setScreen' block is used to set a target activity for the intent ![set screen](assets/intent/set-screen.png) -| Type | Explanation | Required | -| -------- | ----------------------- | -------- | -| Intent | Intent Component | Yes | -| Activity | Activity to navigate to | Yes | +| Type | Explanation | Required | +| -------- | --------------------------| -------- | +| Intent | Targeted intent component | Yes | +| Activity | Targeted activity | Yes | ### putExtra -Pass data to another Activity. After you pass the data, you retrieve the data using the `Activity getExtra key []` block. +Pass data to another Activity. After you pass the data, you retrieve the data using the 'Activity getExtra key []' block. ![put extra](assets/intent/put-extra.png) | Type | Explanation | Required | | ------ | -------------------------------- | -------- | -| Intent | Intent Component | Yes | +| Intent | Targeted intent component | Yes | | String | Key value used to retrieve later | Yes | | String | Value to pass | Yes | ### setFlags -Change the behavior of an activity. +The 'setFlags' block changes the behavior of an activity. 1. `SINGLE_TOP` — Organizes the views in a way that if the view you’re about to transition to was already called before, it would bring that view to the top rather than putting another copy on the top. @@ -62,17 +66,17 @@ Change the behavior of an activity. ![set flags](assets/intent/set-flags.png) -| Type | Explanation | Required | -| ------ | ---------------- | -------- | -| Intent | Intent Component | Yes | -| Flag | Flag to set | Yes | +| Block type | Explanation | Required | +| ---------- | ------------------------- | -------- | +| Intent | Targeted intent component | Yes | +| Flag | Flag to set | Yes | ### startActivity -Start a new activity. +The 'startActivity' block is used to start the actions set by the intent ![start activity](assets/intent/start-activity.png) -| Type | Explanation | Required | -| ------ | ---------------- | -------- | -| Intent | Intent Component | Yes | \ No newline at end of file +| Block type | Explanation | Required | +| ---------- | ------------------------- | -------- | +| Intent | Targeted intent component | Yes | \ No newline at end of file diff --git a/docs/component-mediaplayer.md b/docs/component-mediaplayer.md index 32d696c..f6f5e4a 100644 --- a/docs/component-mediaplayer.md +++ b/docs/component-mediaplayer.md @@ -20,79 +20,79 @@ Creating a MediaPlayer and playing a sound file on a loop. ### create -Create a MediaPlayer with a certain sound file. +The 'create' block creates a MediaPlayer with the selected soundtrack. ![create](assets/mediaplayer/create.png) -| Type | Explanation | Required | -| ----------- | --------------------- | -------- | -| MediaPlayer | MediaPlayer Component | Yes | -| Sound | Sound file to load | Yes | +| Type | Explanation | Required | +| ----------- | ------------------------------ | -------- | +| MediaPlayer | Targeted MediaPlayer Component | Yes | +| Sound | Sound file to load | Yes | ### start -Play the loaded MediaPlayer. +The 'start' block plays the loaded MediaPlayer. ![start](assets/mediaplayer/start.png) -| Type | Explanation | Required | -| ----------- | --------------------- | -------- | -| MediaPlayer | MediaPlayer Component | Yes | +| Type | Explanation | Required | +| ----------- | ------------------------------ | -------- | +| MediaPlayer | Targeted MediaPlayer Component | Yes | ### pause -Pause the playing MediaPlayer. +The 'pause' block pauses the playing MediaPlayer. ![pause](assets/mediaplayer/pause.png) -| Type | Explanation | Required | -| ----------- | --------------------- | -------- | -| MediaPlayer | MediaPlayer Component | Yes | +| Type | Explanation | Required | +| ----------- | ------------------------------ | -------- | +| MediaPlayer | Targeted MediaPlayer Component | Yes | ### seek to -Change the position of the MediaPlayer. +The 'seek to' block changes the time position of the current plaing track in the mediaplayer. ![seek to](assets/mediaplayer/seek-to.png) -| Type | Explanation | Required | -| ----------- | -------------------------------- | -------- | -| MediaPlayer | MediaPlayer Component | Yes | -| Number | Time to seek to, in milliseconds | Yes | +| Type | Explanation | Required | +| ----------- | ------------------------------- | -------- | +| MediaPlayer | Targeted MediaPlayer Component | Yes | +| Number | Time to seek to in milliseconds | Yes | ### get current duration -Get the current position of the MediaPlayer, in milliseconds. +The 'get current duration' block gets the current time position of the MediaPlayer queue in milliseconds. ![get current duration](assets/mediaplayer/get-current-duration.png) -| Type | Explanation | Required | -| ----------- | --------------------- | -------- | -| MediaPlayer | MediaPlayer Component | Yes | +| Type | Explanation | Required | +| ----------- | ------------------------------ | -------- | +| MediaPlayer | Targeted MediaPlayer Component | Yes | ### get song duration -Get the entire length of the sound file, in milliseconds. +The 'get song duration' block gets the entire time length of the sound file in milliseconds. ![get song duration](assets/mediaplayer/get-song-duration.png) -| Type | Explanation | Required | -| ----------- | --------------------- | -------- | -| MediaPlayer | MediaPlayer Component | Yes | +| Type | Explanation | Required | +| ----------- | ------------------------------ | -------- | +| MediaPlayer | Targeted MediaPlayer Component | Yes | ### is playing -Check if the media player is currently playing. +The 'is playing' block checks if the specified media player is currently playing. ![is playing](assets/mediaplayer/is-playing.png) -| Type | Explanation | Required | -| ----------- | --------------------- | -------- | -| MediaPlayer | MediaPlayer Component | Yes | +| Type | Explanation | Required | +| ----------- | ------------------------------ | -------- | +| MediaPlayer | Targeted MediaPlayer Component | Yes | ### set looping -Loop the MediaPlayer if true. +The 'set looping' block decides whether the mediaplayer should loop after the music track queue is finished. The mediaplayer will loop if this option is set to true either by a variable or toggle manually. ![set looping](assets/mediaplayer/set-looping.png) @@ -104,18 +104,18 @@ Loop the MediaPlayer if true. ### is looping -Check if the MediaPlayer is currently in a looping state. +The 'is looping' block checks if the MediaPlayer is currently in a looping state. it will return true if the mediaplayer is currently looping at that state. ![is looping](assets/mediaplayer/is-looping.png) -| Type | Explanation | Required | -| ----------- | --------------------- | -------- | -| MediaPlayer | MediaPlayer Component | Yes | +| Type | Explanation | Required | +| ----------- | ------------------------------ | -------- | +| MediaPlayer | Targeted MediaPlayer Component | Yes | ### reset -Reset the current position to 0. +The 'reset' block resets the current position of the mediaplayer to 0 or you could say, the beginning of the queue. ![reset](assets/mediaplayer/reset.png) @@ -125,11 +125,11 @@ Reset the current position to 0. ### release -Release the connected sound file to the MediaPlayer. If released, you have to recreate the MediaPlayer. +The 'Release' block releases the connected sound file to the MediaPlayer like deleting the queue paths of the sound files. If the mediaplayer has been released, you have to recreate the MediaPlayer or else errors will occur while using most of the mediaplayer blocks. ![release](assets/mediaplayer/release.png) -| Type | Explanation | Required | -| ----------- | --------------------- | -------- | -| MediaPlayer | MediaPlayer Component | Yes | +| Type | Explanation | Required | +| ----------- | ------------------------------ | -------- | +| MediaPlayer | Targeted MediaPlayer Component | Yes |