Package com.google.gwt.media.client

Examples of com.google.gwt.media.client.Audio


        return clone;
    }

    @Override
    public Widget cloneDisplay(Map<String, Object> formData) {
        Audio au = Audio.createIfSupported();
        if (au == null) {
            return new Label(notSupported.getText());
        }
        populate(au);
        Object input = getInputValue(formData);
        if (au != null && input != null) {
            String url = input.toString();
            au.setSrc(url);
            if (url.endsWith(".mp3")) {
                au.getElement().setPropertyString("type", "application/mp3");
            } else if (url.endsWith(".ogg")) {
                au.getElement().setPropertyString("type", "application/ogg");
            } else if (url.endsWith(".mid")) {
                au.getElement().setPropertyString("type", "application/midi");
            }
        }
        super.populateActions(au.getElement());
        return au;
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.media.client.Audio

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.