Hello everyone,
I’m trying to move the TechSmith Smart Player into an Adapt component (still framework v2). Does anyone know if there already exists such a component?
The Smart Player is being used to play interactive videos from Camtasia Studio (where the video stops for a quiz and can jump to different positions depending on the answer).
I’m struggling with the basics to require the techsmith-smart-player.min.js
.
index_player.html
and techsmith-smart-player.min.js
are the files generated by Camtasia Studio (among others). When I copy the script to a new Adapt component, I get an error here:
l.require(
["techsmith-smart-player.min.js"],
function () {
…
}
)
Adapt can't find the resource (which is in the component/js folder).
When I don’t use the whole Loader from Camtasia and wrap the techsmith-smart-player.min.js
contents in a define()
(see smart-player.js
) and require('./smart-player')
, Adapt bundles the content correctly, but I get a TypeError: undefined is not a function (near '...})((this.TSC = this.TS...')
. This is at the very end of the smart-player files.
I understand that this is quite a lot to ask, especially as it isn’t really a purely Adapt-relative question and the smart-player.js files are quite large. So I’m also very happy when someone points me to some resources on how to best use third-party code within Adapt and what to consider when using require.
Thanks