embedded_demo.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>OpenSheetMusicDisplay as an embedded iframe</title>
  7. <meta name="description" content="A showcase for OpenSheetMusicDisplay.">
  8. <meta name="author" content="OpenSheetMusicDisplay contributors">
  9. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" type="text/javascript"></script>
  10. <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.3.0/semantic.min.js"
  11. type="text/javascript"></script>
  12. <link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.3.0/semantic.css" media="all" rel="stylesheet" />
  13. <link rel="icon" href="./favicon.ico?" type="image/x-icon" />
  14. </head>
  15. <body>
  16. <br>
  17. <div style="text-align: center;width: 60%;margin:0 auto">
  18. <h1 class="ui centered header" id="header">
  19. <img src="./favicon.ico?" class="ui image">
  20. </h1>
  21. <h2>
  22. OpenSheetMusicDisplay as an embedded iframe
  23. </h2>
  24. </div>
  25. <div style="padding: 40px;margin:0 auto">
  26. <h3>
  27. Use parameters:
  28. </h3>
  29. <p>
  30. <table class="ui table celled ">
  31. <tr>
  32. <th>Parameter</th>
  33. <th>Values</th>
  34. <th>Default</th>
  35. <th>Description</th>
  36. </tr>
  37. <tr>
  38. <td><b>embedded</b></td>
  39. <td></td>
  40. <td></td>
  41. <td>Activates the embedded mode: controls are hidden (unless other parameters specified)
  42. </td>
  43. </tr>
  44. <tr>
  45. <td>showControls</td>
  46. <td>"0" and "1"</td>
  47. <td>"0" = OFF</td>
  48. <td>If active, the controls of OSMD are shown like usually.</td>
  49. </tr>
  50. <tr>
  51. <td>showZoomControl</td>
  52. <td>"0" and "1"</td>
  53. <td>"0" = OFF</td>
  54. <td>If showControls == 0 and showZoomControl == 1, a small zoomControl widget will be displayed to safe space
  55. </td>
  56. </tr>
  57. <tr>
  58. <td>showHeader</td>
  59. <td>"0" and "1"</td>
  60. <td>"0" = OFF</td>
  61. <td>If activated, the OSMD title will be rendered on top of the sheet</td>
  62. </tr>
  63. <tr>
  64. <td>zoom</td>
  65. <td>floating number between 0.1 and 5.0</td>
  66. <td>1.0</td>
  67. <td>If given, the OSMD zoom level will be set at loading time</td>
  68. </tr>
  69. <tr>
  70. <td>overflow</td>
  71. <td>"hidden" , "auto", "scroll", "visible"</td>
  72. <td>"auto"</td>
  73. <td>If given, this attribute will refresh the state of the css attribute overflow to control the
  74. scrollbar.
  75. </td>
  76. </tr>
  77. <tr>
  78. <td>openUrl</td>
  79. <td>valid URL pointing to a valid musicxml file</td>
  80. <td>"auto"</td>
  81. <td>If given, this attribute open the given musicxml file and display it.<br>
  82. Note that you need to add <i>&endUrl</i> after the URL.
  83. <p>
  84. <h5>Important:</h5>
  85. For now, the resources must be hosted on the same server, otherwise it will be blocked by
  86. <a href="https://de.wikipedia.org/wiki/Cross-Origin_Resource_Sharing">CORS policy</a>.
  87. </p>
  88. <p>
  89. <h5>Examples:</h5>
  90. <a
  91. href="http://localhost:8000/?embedded&openUrl=http://localhost:8000/BrookeWestSample.musicxml&endUrl">
  92. http://localhost:8000/?embedded&openUrl=http://localhost:8000/BrookeWestSample.musicxml&endUrl</a>
  93. <br>
  94. <a
  95. href="http://localhost:8000/?embedded&openUrl=https://wpmedia.musicxml.com/wp-content/uploads/2017/12/MahlFaGe4Sample.mxl&endUrl">http://localhost:8000/?embedded&openUrl=https://wpmedia.musicxml.com/wp-content/uploads/2017/12/MahlFaGe4Sample.mxl&endUrl</a>
  96. </p>
  97. </td>
  98. </tr>
  99. </table>
  100. </div>
  101. <div>
  102. <center>
  103. <h4>Example: http://localhost:8000/?embedded&showZoomControl=1&zoom=0.5</h4>
  104. <iframe src="http://localhost:8000/?embedded&showZoomControl=1&zoom=0.5" width="800" height="1500"
  105. frameborder="1"></iframe>
  106. </center>
  107. </div>
  108. </body>
  109. </html>