Deutsche Version   Deutsche Version


Version Adjustments
1.0 (2024-10-12) Initial version

Motivation

I have always used the Taifun Player for my audio projects because it has more functions than the Player component in the App Inventor. On my current smartphone, the Taifun Player stops after about 20 minutes. However, the AI2 Player component continues to run throughout. This extension adds additional functions to the AI2 player component.


Download

The ZIP-Archiv UrsAI2PlayerAddon for downloading. The archive contains the source code, the compiled binary for uploading to the App Inventor and a sample application.

Usage

A player component must be assigned to the extension in the designer.

Komponentenzuweisung

The additional functions mentioned in the reference are then available.

Reference

Properties

CurrentPosition
Returns the current position of the currently playing audio file.
Duration
Returns the duration of the currently playing audio file.
IsRunningInCompanion
Returns wether the app is running in the companion.
PlayerToUse
Player component to extend
Version
Returns the component's version name.
VersionSDK
Returns running Android SDK version.

Functions

SeekTo (MilliSeconds)
Seeks to specified time position.
StartAt (MilliSeconds)
Start at a given position.

Events

Example

Test-App

Launcher Icon

A small example app shows the use of the extension (see Download).


In the example, the AI2 Player component is used to play a song. The UrsAI2PlayerAddon extension is used to realise fast forward and rewind.

Screenshot Screenshot of the App.

Tools

For developing own extensions I gathered some tips: AI2 FAQ: Develop Extensions.