|
@@ -83,6 +83,31 @@ Add the `ar-video-control` component to a descendant of `<ar-video-player>` as i
|
83
|
83
|
| `"toggleAudio"` | Toggle the audio. |
|
84
|
84
|
| `""` | Do nothing. |
|
85
|
85
|
|
|
86
|
+## Multiple videos
|
|
87
|
+
|
|
88
|
+You may want to play different videos depending on the target that is being tracked. This can be accomplished by setting an `<ar-video-player-source>` for each reference image as in the example below:
|
|
89
|
+
|
|
90
|
+```html
|
|
91
|
+<ar-root>
|
|
92
|
+ <ar-video-player width="2" height="1.125">
|
|
93
|
+
|
|
94
|
+ <!-- Set different videos for different targets -->
|
|
95
|
+ <ar-video-player-source reference-image="mage" src="#mage-video"></ar-video-player-source>
|
|
96
|
+ <ar-video-player-source reference-image="cat" src="#cat-video"></ar-video-player-source>
|
|
97
|
+
|
|
98
|
+ </ar-video-player>
|
|
99
|
+</ar-root>
|
|
100
|
+```
|
|
101
|
+
|
|
102
|
+*Since:* 1.1.0
|
|
103
|
+
|
|
104
|
+### Properties
|
|
105
|
+
|
|
106
|
+| Property | Description | Default |
|
|
107
|
+| -------- | ----------- | ------- |
|
|
108
|
+| `reference-image` | The name of a [reference image](../api/plugin-aframe.md#ar-reference-image). | `""` |
|
|
109
|
+| `src` | Query selector of a `<video>` element. | `""` |
|
|
110
|
+
|
86
|
111
|
## Declarative handlers
|
87
|
112
|
|
88
|
113
|
### Overview
|