js: Uncaught ReferenceError: alphaTab is not defined #1264
-
Is there an existing issue for this?
Current Behaviori try to use alphatab tutorial html in python from PySide6.QtWebEngineWidgets , QWebEngineView Expected Behaviorthe stand alphatab score rendering Steps To Reproduceimport sys class AlphatabViewer(QMainWindow):
if name == "main": and song.html <title>AlphaTab Tutorial</title> <script src="https://cdn.jsdelivr.net/npm/@coderline/alphatab@latest/dist/alphaTab.js"></script> <script src="https://kit.fontawesome.com/b43f0e512e.js"></script> <style type="text/css"> body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
Music sheet is loading
0%
-
00:00 / 00:00
25%
50%
75%
90%
100%
110%
125%
150%
200%
Horizontal
Page
Link to jsFiddle, CodePen, ProjectNo response Found in Version1.3-alpha PlatformOther Environment- **OS**:
macos big Sure
- **Browser**:
- **.net Version**: Anything else?No response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I moved this bug to the discussions because there is no bug directly in alphaTab but you are using it likely not yet correct. The problem is your web view in this case which is too restrictive. Set the following environment variable and then launch your application: And then you can see that the web view blocks loading the data from the urls making alphaTab unavailable. You need to enable certain features in your web view: self.webview.settings().setAttribute(QWebEngineSettings.LocalContentCanAccessRemoteUrls, True) https://doc.qt.io/qtforpython-6/PySide6/QtWebEngineCore/QWebEnginePage.html |
Beta Was this translation helpful? Give feedback.
-
Many Thanks Daniel, you made my day, i code in PySide and i want to use alphatab just to render score sheet and tab. The control is made by my app (tempo, start, stop, pause, etc ..., here is a sample of my app. it will be great to intregate both. https://www.youtube.com/watch?v=1wpxwOgzxv4 |
Beta Was this translation helpful? Give feedback.
I moved this bug to the discussions because there is no bug directly in alphaTab but you are using it likely not yet correct.
The problem is your web view in this case which is too restrictive. Set the following environment variable and then launch your application:
QTWEBENGINE_REMOTE_DEBUGGING=4444
then you can open in a normal browserhttp://localhost:4444
to get the developer tools open for your app.And then you can see that the web view blocks loading the data from the urls making alphaTab unavailable.
You need to enable certain features in your web view:
https://doc.qt.io/qtforpyt…