aframevr / aframevr/aframe

add warning if <video><source/></video> is used that A-Frame won't support for now

Open
#2,354 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

Description:
For the component a-assets your video expect to be

<a-video src="airbending.mp4"></a-video>

Wich is not W3C compliant.
The best implementation should be:

            <video preload="auto"  autoplay="false" id="my-video-1" loop="false" webkit-playsinline playsinline controls muted>
                <source src="airbending.mp4" type="video/mp4"/> // At least one source
                 <!-- <source src="movie.ogg" type="video/ogg">-->
                  <!-- <a-entity text="value:fallback text for video">-->
            </video>

But you dont let in aframe master the possibility of using sources inside video tag.
If people use the source tag instead of scr directly inside video tag you send a warn about no src or srcObject but it's wrong.
The video contain an src object in source child element, and the best source tag is chosen to match best format for each navigators.

  • A-Frame Version:
    v0.4.0
  • Platform / Device:
    ALL
  • Reproducible Code Snippet or URL:
    None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by locating the a-assets video handling and the warning for missing src or srcObject, then check how a video with source child elements is processed. Done means source-based videos no longer trigger the incorrect warning while genuinely missing sources still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.