| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1975 | 1975 |
| 1976 void HTMLMediaElement::setCurrentTime(double time, ExceptionState& es) | 1976 void HTMLMediaElement::setCurrentTime(double time, ExceptionState& es) |
| 1977 { | 1977 { |
| 1978 if (m_mediaController) { | 1978 if (m_mediaController) { |
| 1979 es.throwUninformativeAndGenericDOMException(InvalidStateError); | 1979 es.throwUninformativeAndGenericDOMException(InvalidStateError); |
| 1980 return; | 1980 return; |
| 1981 } | 1981 } |
| 1982 seek(time, es); | 1982 seek(time, es); |
| 1983 } | 1983 } |
| 1984 | 1984 |
| 1985 double HTMLMediaElement::initialTime() const | |
| 1986 { | |
| 1987 if (m_fragmentStartTime != MediaPlayer::invalidTime()) | |
| 1988 return m_fragmentStartTime; | |
| 1989 | |
| 1990 return 0; | |
| 1991 } | |
| 1992 | |
| 1993 double HTMLMediaElement::duration() const | 1985 double HTMLMediaElement::duration() const |
| 1994 { | 1986 { |
| 1995 if (!m_player || m_readyState < HAVE_METADATA) | 1987 if (!m_player || m_readyState < HAVE_METADATA) |
| 1996 return numeric_limits<double>::quiet_NaN(); | 1988 return numeric_limits<double>::quiet_NaN(); |
| 1997 | 1989 |
| 1998 // FIXME: Refactor so m_duration is kept current (in both MSE and | 1990 // FIXME: Refactor so m_duration is kept current (in both MSE and |
| 1999 // non-MSE cases) once we have transitioned from HAVE_NOTHING -> | 1991 // non-MSE cases) once we have transitioned from HAVE_NOTHING -> |
| 2000 // HAVE_METADATA. Currently, m_duration may be out of date for at least MSE | 1992 // HAVE_METADATA. Currently, m_duration may be out of date for at least MSE |
| 2001 // case because MediaSourceBase and SourceBuffer do not notify the element | 1993 // case because MediaSourceBase and SourceBuffer do not notify the element |
| 2002 // directly upon duration changes caused by endOfStream, remove, or append | 1994 // directly upon duration changes caused by endOfStream, remove, or append |
| (...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3881 { | 3873 { |
| 3882 scheduleLayerUpdate(); | 3874 scheduleLayerUpdate(); |
| 3883 } | 3875 } |
| 3884 | 3876 |
| 3885 bool HTMLMediaElement::isInteractiveContent() const | 3877 bool HTMLMediaElement::isInteractiveContent() const |
| 3886 { | 3878 { |
| 3887 return fastHasAttribute(controlsAttr); | 3879 return fastHasAttribute(controlsAttr); |
| 3888 } | 3880 } |
| 3889 | 3881 |
| 3890 } | 3882 } |
| OLD | NEW |