Skip to content
Amoh Gyebi Ampofo edited this page Apr 12, 2021 · 8 revisions

Welcome to the soloman wiki!

Installation

pip install soloman

Usage for python

Play audio

from soloman import Audio


aud = Audio()
aud.play('/path/to/music.mp3')

Qml Usage

example.py

import soloman
...
engine = QQmlApplicationEngine()
...
engine.load('example.qml')

Play audio

example.qml

import QtQuick 2.15
...
import soloman 2.5

SAudio {
    id: aud
}

Button {
    text: "Play"
    onClicked: aud.play('path/to/music.mp3')
}

Play videos

example.qml

Play a video file

import QtQuick 2.15
...
import soloman 2.5

SVideo {
    id: vid
}

Button {
    text: "Play video"
    onClicked: vid.play('path/to/video.mp4')
}

Play stills

Option one
...
    onClicked: vid.play('path/to/video_stills_01.jpg') # possibly the first image
...
Option two
...
    onClicked: vid.play('path/to/') # make sure folder contains only stills
...