This commit is contained in:
Junji Takakura 2015-01-24 17:28:24 +09:00
parent 0206ea4e0a
commit ec4e4a9771
13 changed files with 222 additions and 188 deletions

View File

@ -31,16 +31,16 @@ import org.teavm.jso.JSProperty;
*/
public interface HTMLMediaElement extends HTMLElement {
public static final int HAVE_NOTHING = 0;
public static final int HAVE_METADATA = 1;
public static final int HAVE_CURRENT_DATA = 2;
public static final int HAVE_FUTURE_DATA = 3;
public static final int HAVE_ENOUGH_DATA = 4;
int HAVE_NOTHING = 0;
int HAVE_METADATA = 1;
int HAVE_CURRENT_DATA = 2;
int HAVE_FUTURE_DATA = 3;
int HAVE_ENOUGH_DATA = 4;
public static final int NETWORK_EMPTY = 0;
public static final int NETWORK_IDLE = 1;
public static final int NETWORK_LOADING = 2;
public static final int NETWORK_NO_SOURCE = 3;
int NETWORK_EMPTY = 0;
int NETWORK_IDLE = 1;
int NETWORK_LOADING = 2;
int NETWORK_NO_SOURCE = 3;
@JSProperty
MediaError getError();
@ -55,10 +55,10 @@ public interface HTMLMediaElement extends HTMLElement {
String getCurrentSrc();
@JSProperty
void setCurrentSrc(String currentSrc);
String getCrossOrigin();
@JSProperty
String getCrossOrigin();
void setCrossOrigin(String crossOrigin);
@JSProperty
int getNetworkState();
@ -88,10 +88,10 @@ public interface HTMLMediaElement extends HTMLElement {
double getDuration();
@JSProperty
Date getStartOffsetTime();
Date getStartDate();
@JSProperty
boolean getPaused();
boolean isPaused();
@JSProperty
double getDefaultPlaybackRate();
@ -112,7 +112,7 @@ public interface HTMLMediaElement extends HTMLElement {
TimeRanges getSeekable();
@JSProperty
boolean getEnded();
boolean isEnded();
@JSProperty
boolean isAutoplay();
@ -120,13 +120,18 @@ public interface HTMLMediaElement extends HTMLElement {
@JSProperty
void setAutoplay(boolean autoplay);
@JSProperty
boolean isLoop();
@JSProperty
void setLoop(boolean loop);
@JSProperty
String getMediaGroup();
@JSProperty
void setMediaGroup(String mediaGroup);
@JSProperty
MediaController getController();
@ -134,10 +139,10 @@ public interface HTMLMediaElement extends HTMLElement {
void setController(MediaController controller);
@JSProperty
boolean getControlls();
boolean isControls();
@JSProperty
void setControlls(boolean controlls);
void setControls(boolean controls);
@JSProperty
float getVolume();

View File

@ -27,10 +27,10 @@ public interface HTMLVideoElement extends HTMLMediaElement {
int getWidth();
@JSProperty
void setWidth(int width);
int getHeight();
@JSProperty
int getHeight();
void setWidth(int width);
@JSProperty
void setHeight(int height);
@ -38,15 +38,12 @@ public interface HTMLVideoElement extends HTMLMediaElement {
@JSProperty
int getVideoWidth();
@JSProperty
void setVideoWidth(int videoWidth);
@JSProperty
int getVideoHeight();
@JSProperty
void setVideoHeight(int videoHeight);
String getPoster();
@JSProperty
String getPoster();
void setPoster(String poster);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -15,13 +15,14 @@
*/
package org.teavm.dom.media;
import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty;
/**
*
* @author Junji Takakura
*/
public interface AudioTrack {
public interface AudioTrack extends JSObject {
@JSProperty
String getId();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,16 +16,13 @@
package org.teavm.dom.media;
import org.teavm.dom.events.EventTarget;
import org.teavm.jso.JSProperty;
import org.teavm.jso.JSArrayReader;
/**
*
* @author Junji Takakura
*/
public interface AudioTrackList extends EventTarget {
@JSProperty
int getLength();
public interface AudioTrackList extends EventTarget, JSArrayReader<AudioTrack> {
AudioTrack item(int index);
AudioTrack getTrackById(String id);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -78,6 +78,4 @@ public interface MediaController extends JSObject {
void play();
void pause();
void unpause();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -24,10 +24,10 @@ import org.teavm.jso.JSProperty;
*/
public interface MediaError extends JSObject {
public static final int MEDIA_ERR_ABORTED = 1;
public static final int MEDIA_ERR_NETWORK = 2;
public static final int MEDIA_ERR_DECODE = 3;
public static final int MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
int MEDIA_ERR_ABORTED = 1;
int MEDIA_ERR_NETWORK = 2;
int MEDIA_ERR_DECODE = 3;
int MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
@JSProperty
int getCode();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -15,17 +15,18 @@
*/
package org.teavm.dom.media;
import org.teavm.dom.events.EventTarget;
import org.teavm.jso.JSProperty;
/**
*
* @author Junji Takakura
*/
public interface TextTrack {
public interface TextTrack extends EventTarget {
public static final String DISABLED = "disabled";
public static final String HIDDEN = "hidden";
public static final String SHOWING = "showing";
String DISABLED = "disabled";
String HIDDEN = "hidden";
String SHOWING = "showing";
@JSProperty
String getId();
@ -45,12 +46,6 @@ public interface TextTrack {
@JSProperty
void setMode(String mode);
@JSProperty
boolean isEnabled();
@JSProperty
void setEnabled(boolean enabled);
@JSProperty
TextTrackCueList getCues();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -15,6 +15,7 @@
*/
package org.teavm.dom.media;
import org.teavm.dom.core.DocumentFragment;
import org.teavm.dom.events.EventTarget;
import org.teavm.jso.JSProperty;
@ -24,21 +25,74 @@ import org.teavm.jso.JSProperty;
*/
public interface TextTrackCue extends EventTarget {
@JSProperty
TextTrack getTrack();
@JSProperty
String getId();
@JSProperty
void setId(String id);
@JSProperty
double getStartTime();
@JSProperty
void setStartTime(double startTime);
@JSProperty
double getEndTime();
@JSProperty
void setEndTime(double endTime);
@JSProperty
boolean isPauseOnExit();
@JSProperty
void setPauseOnExit(boolean pauseOnExit);
@JSProperty
String getVertical();
@JSProperty
void setVertical(String vertical);
@JSProperty
boolean isSnapToLines();
@JSProperty
void setSnapToLines(boolean snapToLines);
@JSProperty
int getLine();
@JSProperty
void setLine(int line);
@JSProperty
int getPosition();
@JSProperty
void setPosition(int position);
@JSProperty
int getSize();
@JSProperty
void setSize(int size);
@JSProperty
String getAlign();
@JSProperty
void setAlign(String align);
@JSProperty
String getText();
@JSProperty
TextTrack getTrack();
void setText(String text);
DocumentFragment getCueAsHTML();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -15,19 +15,14 @@
*/
package org.teavm.dom.media;
import org.teavm.jso.JSArrayReader;
import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty;
/**
*
* @author Junji Takakura
*/
public interface TextTrackCueList extends JSObject {
public interface TextTrackCueList extends JSObject, JSArrayReader<TextTrackCue> {
@JSProperty
int getLength();
TextTrackCue item(int index);
TextTrackCue getTrackById(String id);
TextTrackCue getCueById(String id);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,18 +16,13 @@
package org.teavm.dom.media;
import org.teavm.dom.events.EventTarget;
import org.teavm.jso.JSProperty;
import org.teavm.jso.JSArrayReader;
/**
*
* @author Junji Takakura
*/
public interface TextTrackList extends EventTarget {
@JSProperty
int getLength();
TextTrack item(int index);
public interface TextTrackList extends EventTarget, JSArrayReader<TextTrack> {
TextTrack getTrackById(String id);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -15,13 +15,14 @@
*/
package org.teavm.dom.media;
import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty;
/**
*
* @author Junji Takakura
*/
public interface VideoTrack {
public interface VideoTrack extends JSObject {
@JSProperty
String getId();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2015 Alexey Andreev.
* Copyright 2014 Alexey Andreev.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,21 +16,17 @@
package org.teavm.dom.media;
import org.teavm.dom.events.EventTarget;
import org.teavm.jso.JSArrayReader;
import org.teavm.jso.JSProperty;
/**
*
* @author Junji Takakura
*/
public interface VideoTrackList extends EventTarget {
@JSProperty
int getLength();
public interface VideoTrackList extends EventTarget, JSArrayReader<VideoTrack> {
@JSProperty
int getSelectedIndex();
VideoTrack item(int index);
VideoTrack getTrackById(String id);
}