Thời gian có nghĩa là gì trong HTML?

SEO & Kỹ thuật số toàn diện đã được xây dựng bởi Koray Tuğberk GÜBÜR. SEO toàn diện là quá trình phát triển các dự án tiếp thị kỹ thuật số tích hợp với mọi khía cạnh bao gồm Viết mã, Xử lý ngôn ngữ tự nhiên, Khoa học dữ liệu, Tốc độ trang, Phân tích kỹ thuật số, Tiếp thị nội dung, SEO kỹ thuật và Xây dựng thương hiệu. Structured, Semantic Search Engine improves its ability to detect the real-world entities, today. Having a simple website is not enough anymore. Để chứng tỏ rằng thương hiệu của bạn có thẩm quyền, đáng tin cậy và là chuyên gia trong lĩnh vực riêng của nó, bạn cần có các Dự án Tối ưu hóa Công cụ Tìm kiếm dựa trên thực thể. Trọng tâm chính của SEO & Kỹ thuật số toàn diện là cải thiện khả năng hiển thị hữu cơ và tiềm năng tăng trưởng của thương hiệu
Thẻ được sử dụng để hiển thị ngày/giờ mà con người có thể đọc được. It can also be used to encode dates and times in a machine-readable form. The main advantage for users is that they can offer to add birthday reminders or scheduled events in their calendar’s and search engines can produce smarter search results

We would especially like to thank Rob Martell (Digital Renaissance) for his review and contributions to this specification

Additional contributors. Pablo Fernicola (Microsoft)Kevin Gallo (Microsoft)Richard Gardner (Microsoft)Ajay Jindal (Microsoft)Dave Massy (Microsoft)Thomas Reardon (Microsoft)Mark VanAntwerp (Microsoft)Michael Winser (Microsoft)

Status of This Document

This document is a submission to the World Wide Web Consortium (see Submission Request, W3C Staff Comment). It is intended for review and comment by W3C members

This document is a NOTE made available by the W3 Consortium for discussion only. This indicates no endorsement of its content, nor that the Consortium has, is, or will be allocating any resources to the issues addressed by the NOTE

Abstract

This document presents Timed Interactive Multimedia Extensions for HTML (HTML+TIME). This is a proposal for adding timing and synchronization support to HTML. HTML+TIME builds upon the SMIL recommendation to extend SMIL concepts into HTML and web browsers. The current version is a result of collaboration and review among Microsoft, Macromedia, Compaq/Digital and Digital Renaissance.   It is currently only a proposal and subject to change.   It assumed that the reader is familiar with the ideas expressed in the W3C Recommendation. SMIL


Contents

The W3C has recently approved SMIL as a recommendation.   SMIL introduces many valuable ideas, but has some limitations. In particular, SMIL is a data interchange format for media authoring tools and players - it does not include a means to apply the ideas to HTML and web browsers. This document describes a means of extending SMIL functionality into HTML and Web browsers. The proposal includes timing and interactivity extensions for HTML, as well as the addition of several new tags to support specific features described in the SMIL 1. 0 spec.   HTML+TIME also adds some extensions to the timing and synchronization model, appropriate to the Web browser domain

HTML+TIME is not intended to supplant SMIL.   The SMIL 1. 0 standard supports many applications that need to describe multimedia presentations, independent of HTML and traditional web browsers.   HTML+TIME is closely aligned with SMIL to make it simple for authors and tools to use both specifications.   HTML+TIME also introduces a number of extensions to SMIL that  are required for a reasonable level of flexibility and control.   These extensions could easily be worked into the SMIL specification as well (indeed, some of the ideas have been discussed by the SYMM WG in the context of SMIL)

The layout capabilities described in the SMIL specification are subsumed by the CSS functionality standard in current browsers. Several other minor features are also standard in HTML, and are not duplicated here (but are documented in )

Finally, an Object Model is described for HTML+TIME.   The SMIL 1. 0 specification did not include this, but given the tradition of HTML and the DOM, we feel this is a critical aspect of the specification

A set of extensions are described to add additional timing, interaction and media delivery capabilities to HTML.   These are modeled closely along the lines of SMIL, and attempt to reuse terminology wherever feasible.   The timing and interaction support augment current script support for timers and DHTML.  

Using the timing extensions, any HTML element can be set to appear at a given time, to last for a specified duration, and to repeat (i. e. loop).  Simple timing is supported with a very simple syntax, but more complex timing constructs can also be described.   Interactive timing is supported. The first section of this document describes how the timing support is designed, and how script writers use the timing extensions

In order to easily integrate time-based media (movies, audio and animation content), a set of new media tags are introduced (again, based upon the SMIL 1. 0 specification), and the associated integration with the timing model is documented

Additional tags are described to support fine-grained control of synchronization and media-loading behavior. Also, the notion of temporal hyperlinks presented in SMIL is generalized to apply to HTML in general

SMIL introduces some very powerful elements that support conditional delivery of content, specifically to support differing client platform multimedia capabilities and preference settings. These are included with minor changes in this proposal as well

Cuối cùng, mô hình đối tượng hỗ trợ thời gian được ghi lại.   Included is a discussion of support for media extensions and for extension behaviors that will take advantage of the timing support

With the advent of CSS, the DOM and dynamic properties, it is possible for HTML to be a much more powerful medium.   Designers can now begin to think of the web page not just as a static page of information, but as a dynamic, interactive presentation.   Various tools exist to author animation based upon custom runtimes, and at least one (Macromedia Dreamweaver) supports animation based upon script and timers.   Finally, the W3C Recommendation. SMIL specifies a means of describing media-rich timelines in a separate XML-based file

None of these solutions provide a simple, standard means for HTML authors to easily add timing and interaction relationships to arbitrary HTML elements, and to coordinate these with time-based media. HTML+TIME will fill this need. It defines a simple and powerful standard for time containment within the document

Timing support is based upon a simple model of adding attributes to HTML elements. HTML elements can be set to have a begin time and a duration. Additionally, elements can be made to repeat.    We describe this as "decorating" the HTML with additional attributes.    The important point is that HTML authors need not learn an entirely new syntax or document structure to add timing to pages.   They simply add attributes to the elements that they want to be dynamic

For more complex scenarios, authors can group timing into timelines. These timelines can then be controlled and timed as well.   The structure is in some ways analogous to the DOM structure (cf. the

tag in particular), in that it defines a local time region.   Two means are provided of defining local timelines. a new tag, and an attribute that can be applied to HTML container elements

Note that the timing support augments the behavior of the elements only with respect to the time during which the element is active or visible. The rules for applying the timing are fairly simple

  • For all style tags (i. e. all tags that affect the style of an element), the time behavior will remove the style before and after the defined begin and end times.   The implementation details are described more fully in the Object Model section below
  • Đối với tất cả các phần tử được hiển thị, hành vi thời gian sẽ kiểm soát thuộc tính khả năng hiển thị hoặc thuộc tính hiển thị của kiểu cục bộ. By default, the visibility attribute will be used, and the document will not reflow in response to timing.   An additional attribute allows the author to specify that the display attribute be used instead. Điều này sẽ gây ra một dòng chảy lại tài liệu để đáp ứng với các sự kiện thời gian

For time-based media, a media player is controlled to start and stop the media when appropriate

See the discussion of current

All HTML elements that are legal within the BODY and that represent content or style, can support timing. presents the list of HTML elements, and the classification of elements for the purposes of timing support

HTML Tag Attributes

For all HTML elements that support timing, the following simple timing attributes are supported

beginThis xác định phần bù (i. e. độ trễ) tính bằng giây tại đó phần tử sẽ được hiển thị. Theo mặc định (tôi. e. trong trường hợp không có bất kỳ chỉ thị cơ sở thời gian hoặc chỉ thị dòng thời gian nào), đây là phần bù từ thời điểm trang được hiển thị
Giá trị pháp lý là giá trị đồng hồ đã ký. beginWithXác định cơ sở thời gian là điểm bắt đầu của phần tử được tham chiếu. Điều này hỗ trợ thời gian tương đối giữa các yếu tố. Phần tử hiện tại sẽ bắt đầu cùng lúc với phần tử được tham chiếu (cộng hoặc trừ bất kỳ giá trị bắt đầu nào)
Giá trị pháp lý là ID phần tử trong phạm vi thời gian hiện tại (xem bên dưới)
Không được chỉ định nhiều hơn một trong số beginWith, beginAfter hoặc beginEvent. beginafterXác định cơ sở thời gian là kết thúc của phần tử được tham chiếu. Điều này hỗ trợ thời gian tuần tự tương đối giữa các yếu tố. Phần tử hiện tại sẽ bắt đầu khi phần tử được tham chiếu kết thúc (cộng hoặc trừ bất kỳ giá trị bắt đầu nào). Nếu phần tử được tham chiếu không có thời lượng xác định (i. e. đang hoạt động vô thời hạn), phần tử hiện tại có thể không bao giờ hoạt động/hiển thị (mặc dù điều này không được coi là lỗi tập lệnh)
Giá trị pháp lý là ID phần tử trong phạm vi thời gian hiện tại (xem bên dưới)
Không được chỉ định nhiều hơn một trong số beginWith, beginafter hoặc beginEvent. beginEventXác định cơ sở thời gian có liên quan đến sự kiện được tham chiếu. Sự kiện có thể là sự kiện thời gian (e. g. yếu tố. onBegin) as well as any other event supported by the DOM (e. g. element. onClick, document. onLoad). This supports interactive timing within a document, and removes the need to add script to "wire" elements together.   Interactive  in this sense includes. user-interactivewhere the element begins in response to events like onclickserver-interactivewhere the element begins in response to an event that will be raised by some media player (e. g. an . avi file renderer that supports event streams). presentation-interactivewhere the element begins in response to an event that will be raised by the presentation engine itself.   An example would be an element that appears only when a resync event is generated; an author can choose to present some indication that some media elements are resynchronizing

The current element will begin when the referenced event is raised (plus any begin value). If the referenced event is never raised, the current element may never be active/displayed. If a negative begin (delay) value is used with this attribute, the element will start when the event is raised, but will start the local timeline at an offset from 0. See also the section on negative offsets in  below
If the named event is "none", this element will simply wait to be turned on (e. g. by script)
No more than one of beginWith, beginAfter or beginEvent should be specified
Legal values include

ElementID ". " EventNameAny defined event name, referenced by the associated element ID. E. g. "button1. onclick"
Where timing events are used (i. e. onBegin and onEnd), element must be within the current time scope (see below)"none"The string "none". durThis defines the duration in seconds for which the element should remain active or displayed.   When this attribute is absent (and no end attribute is specified), the duration for all normal HTML elements is indefinite. See also the discussion of , below
Legal values are clock values greater than 0. endThis xác định thời gian kết thúc cho phần tử. Khi không có thuộc tính này (và không có thuộc tính thời lượng nào được chỉ định), thời lượng cho tất cả các phần tử HTML thông thường là không xác định. Xem thêm cuộc thảo luận về , bên dưới
Giá trị pháp lý là giá trị đồng hồ đã ký. endWithXác định thời gian kết thúc là kết thúc của phần tử được tham chiếu. Điều này hỗ trợ đồng bộ hóa điểm cuối giữa các phần tử. Phần tử hiện tại sẽ kết thúc cùng lúc với phần tử được tham chiếu (cộng hoặc trừ bất kỳ giá trị kết thúc nào)
Giá trị pháp lý là ID phần tử trong phạm vi thời gian hiện tại (xem bên dưới). endEventXác định thời gian kết thúc có liên quan đến sự kiện được tham chiếu. Sự kiện có thể là sự kiện thời gian (e. g. yếu tố. onBegin) cũng như bất kỳ sự kiện nào khác được hỗ trợ bởi DOM (e. g. yếu tố. onClick, tài liệu. đang tải). Xem thêm ghi chú về beginEvent
Phần tử hiện tại sẽ kết thúc khi sự kiện được tham chiếu được nâng lên (cộng với bất kỳ giá trị kết thúc nào). Nếu sự kiện được tham chiếu không bao giờ được nêu ra, phần tử hiện tại có thể vẫn hoạt động. Nếu giá trị kết thúc (độ trễ) âm được sử dụng với thuộc tính này, nó sẽ bị bỏ qua
Lưu ý rằng nếu thời lượng được xác định (với thuộc tính end hoặc dur), thời lượng sẽ ghi đè endEvent. Điều này cho phép tác giả chỉ định thời lượng tối đa ngoài cơ chế tương tác
Nếu sự kiện được đặt tên là "không", phần tử này sẽ chỉ đợi để tắt (e. g. theo kịch bản). Điều này là không bắt buộc và được thực hiện dễ dàng hơn bằng cách chỉ định không có kết thúc hoặc thời lượng cho một phần tử;
Giá trị pháp lý bao gồm. ID phần tử ". " EventNameBất kỳ tên sự kiện nào được xác định, được tham chiếu bởi ID phần tử được liên kết. e. g. "nút1. trong một cái nhấp chuột"
Trường hợp các sự kiện thời gian được sử dụng (i. e. onBegin và onEnd), phần tử phải nằm trong phạm vi thời gian hiện tại (xem bên dưới)"none"Chuỗi "none". lặp lạiĐiều này làm cho phần tử phát lặp lại (vòng lặp) trong số lần đã chỉ định. Mỗi lần lặp lại kéo dài trong khoảng thời gian được xác định bởi thuộc tính dur hoặc end. Thuộc tính này không ảnh hưởng nếu thời lượng không được xác định hoặc không xác định (xem thêm, bên dưới). Số lần lặp lại nhỏ hơn 1 sẽ cắt ngắn thời lượng đơn giản đã chỉ định. Số lần lặp lại là 1 là không hoạt động
Các giá trị pháp lý là các phép lặp số nguyên hoặc phân số, lớn hơn 0
Tối đa một lần lặp lại hoặc lặp lạiDur phải được chỉ định
Ngoài ra, giá trị "không xác định" có thể được chỉ định để chỉ ra rằng phần tử sẽ lặp lại vô thời hạn (mãi mãi). repeatDurĐiều này làm cho phần tử phát lặp lại (vòng lặp) trong khoảng thời gian đã chỉ định (tính bằng giây). Mỗi lần lặp lại kéo dài trong khoảng thời gian được xác định bởi thuộc tính dur hoặc end. Thuộc tính này không ảnh hưởng nếu thời lượng không được xác định hoặc không xác định   (xem thêm , bên dưới). Thời lượng lặp lại nhỏ hơn thời lượng đơn giản được chỉ định trong dur sẽ cắt ngắn thời lượng. Thời lượng lặp lại bằng với thời lượng đơn giản là không hoạt động
Legal values are clock values greater than 0
Không nên chỉ định nhiều hơn một lặp lại hoặc lặp lạiDur
Ngoài ra, "không xác định" có thể được chỉ định để chỉ ra rằng phần tử sẽ lặp lại vô thời hạn (mãi mãi). nội dung bỏ qua Thuộc tính này được giới thiệu cho khả năng mở rộng trong tương lai của HTML+TIME (và SMIL). Nó được giải thích trong hai trường hợp sau đây
  • Nếu một phần tử mới được giới thiệu trong phiên bản tương lai của HTML+TIME và phần tử này cho phép HTML+TIME 1. 0 dưới dạng nội dung phần tử, thuộc tính "skip-content" kiểm soát xem nội dung này có được xử lý bởi HTML+TIME 1 hay không. 0 trình duyệt
  • Nếu một phần tử trống trong HTML+TIME phiên bản 1. 0 trở thành không trống trong phiên bản HTML+TIME trong tương lai, thuộc tính "skip-content" kiểm soát xem nội dung này có bị HTML+TIME 1 bỏ qua hay không. 0 hỗ trợ trình duyệt hoặc dẫn đến lỗi cú pháp

Nếu giá trị của thuộc tính "skip-content" là "true" và áp dụng một trong các trường hợp trên, thì nội dung của phần tử sẽ bị bỏ qua. Nếu giá trị là "false", nội dung của phần tử được xử lý
Giá trị mặc định cho  "skip-content" là "true"
Người đánh giá - điều này có thực sự cần thiết trong ngữ cảnh HTML/CSS không?

timeActionĐiều này xác định thuộc tính sẽ được kiểm soát theo thời gian khi phần tử bắt đầu và kết thúc trên dòng thời gian cục bộ. Đối với các phần tử hiển thị, các giá trị phù hợp là "hiển thị" và "khả năng hiển thị". Đối với các phần tử kiểu HTML (e. g. B, MẠNH), thuộc tính này bị bỏ qua và hành động sẽ là kiểm soát hành vi nội tại của phần tử. Một giải pháp thay thế cho điều này là kiểm soát kiểu nội tuyến trên e. g. một phần tử SPAN, sử dụng "timeAction=style"
Lưu ý rằng các phần mở rộng XML phải hỗ trợ thuộc tính "khả năng hiển thị" cho các phần tử về cơ bản là nội dung và thuộc tính "bật" cho các phần tử kiểu. Theo cách này, các tiện ích mở rộng có thể được tích hợp dễ dàng với HTML+TIME
Thuộc tính này chỉ áp dụng cho thẻ phần tử
Giá trị pháp lý là. displayĐiều này gây ra phong cách. thuộc tính hiển thị được sử dụng để làm cho các phần tử xuất hiện và biến mất trên dòng thời gian. Nó hữu ích cho những thứ như trình chiếu trong đó tài liệu sẽ chỉnh lại dòng khi các yếu tố đến và đi trên dòng thời gian. khả năng hiển thịĐiều này gây ra phong cách. thuộc tính khả năng hiển thị được sử dụng để làm cho các phần tử xuất hiện và biến mất trên dòng thời gian. Nó hữu ích cho một số bản trình bày trong đó bố cục tài liệu được xác định độc lập với dòng thời gian và các phần tử chỉ xuất hiện và biến mất trong tài liệu theo thời gian mà không gây ra các hành động chỉnh lại dòng
Đây là mặc định. styleĐiều này khiến thuộc tính kiểu nội tuyến bị xóa và áp dụng cho phần tử theo thời gian (i. e. khi giờ địa phương không hoạt động, việc triển khai sẽ gọi phần tử. removeAttribute() cho thuộc tính kiểu nội tuyến và thay thế thuộc tính kiểu nội tuyến khi giờ địa phương đang hoạt động). Nếu không có thuộc tính kiểu nội tuyến được xác định trên phần tử, thì điều này không có tác dụng gì. Điều này cho phép kiểm soát dễ dàng hơn đối với các kiểu dựa trên thời gian phức tạp. onOffĐiều này làm cho thuộc tính "bật" của phần tử được chuyển đổi giữa đúng và sai theo thời gian. Nếu không có thuộc tính "bật" được xác định cho phần tử, điều này không có tác dụng gì. Thuộc tính "bật" bật và tắt hành vi nội tại của phần tử. Điều này cho phép các kiểu mở rộng chung được hỗ trợ theo thời gian (e. g. các phần tử kiểu dáng của VML hỗ trợ mô hình này)

Cú pháp giá trị đồng hồ

Giá trị đồng hồ có cú pháp sau

Signed-Clock-value ::= ("+" | "-" )? Clock-value  ; default is "+"
Clock-value        ::= HMS-value | Timecount-value
HMS-value          ::= (Hours ":")? Minutes ":" Seconds ("." Fraction)?
Timecount-value    ::= Timecount ("." Fraction)? 
                        ("h" |"min" |"s" |"ms")?  ; default is "s"
Hours              ::= DIGIT+
Minutes            ::= 2DIGIT  ; range from 00 to 59
Seconds            ::= 2DIGIT  ; range from 00 to 59
Fraction           ::= DIGIT+
Timecount          ::= DIGIT+
2DIGIT             ::= DIGIT DIGIT
DIGIT              ::= [0-9]

Các trường phút và giây trong giá trị HMS bị ràng buộc trong phạm vi từ 00 đến 59; . " và ". " dấu phân cách. Giờ có thể là bất kỳ giá trị số nguyên nào và không cần có số 0 đứng đầu. Giây phân số trong cả giá trị HMS và giá trị Giây có thể có độ chính xác tùy ý, nhưng không đảm bảo độ chính xác nào lớn hơn mili giây

Sau đây là các ví dụ về giá trị đồng hồ hợp pháp

  • giá trị đồng hồ
    02. 30. 03 = 2 giờ 30 phút 3 giây
    2. 33 = 2 phút 33 giây
  • Giá trị đếm thời gian
    3h = 3 hours
    45min = 45 minutes
    30 giây = 30 giây
    5ms = 5 mili giây
  • Giá trị đồng hồ đã ký
    +2. 10 = plus 2 minutes and 10 seconds
    +300ms = cộng thêm 300 mili giây
    -10. 3 = trừ 10. 3 seconds (10,300 milliseconds)

Chúng ta có thể thêm thuộc tính vào bất kỳ đối tượng nào trong HTML để thêm thời gian. Theo mặc định, tất cả các yếu tố thời gian đều liên quan đến ngữ cảnh gốc của tài liệu và do đó tồn tại trong một phạm vi thời gian duy nhất cho trang. Tôi. e. không yêu cầu/xác định thời gian lồng nhau trong các ví dụ được trích dẫn. hỗ trợ cho phép các cấu trúc mạnh mẽ hơn khi tác giả cần chúng. Nevertheless, scripters just beginning to use TIME do not have to understand anything about a timing structure or hierarchy to do simple things. Ngoài ra, tất cả các phần bù đều ở trong cùng một khoảng thời gian (trong trường hợp đơn giản, mặc định), giúp dễ dàng căn chỉnh các phần tử theo thời gian được trình bày trên toàn trang

Thí dụ. Làm cho đoạn văn xuất hiện theo thời gian

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...

Để hỗ trợ tính linh hoạt cao hơn về thời gian tương đối, chúng tôi sử dụng các tham số cơ sở thời lượng và thời gian

Lưu ý cho người đánh giá
Nhiều thời gian chạy đa phương tiện hỗ trợ thời gian tương đối có thứ bậc hoàn chỉnh, được gắn với biểu đồ cảnh hoặc một số tương đương. Điều này có ý nghĩa, vì hệ thống phân cấp ngăn chặn/từ vựng rõ ràng với biểu đồ cảnh. Tuy nhiên, hầu hết các tác giả HTML không làm việc với mô hình người dùng HTML bao gồm phân cấp ngăn chặn/từ vựng dựa trên DOM thực tế. Việc ràng buộc ngăn chặn thời gian với ngăn chặn DOM tốt nhất sẽ gây nhầm lẫn. Do đó, chúng tôi sẽ hỗ trợ thời gian mặc định như được mô tả ở trên, cộng với các khoảng thời gian rõ ràng và cơ sở thời gian tham chiếu  (i. e. thời gian liên quan đến phần tử được đặt tên khác). Các tác giả HTML nên dễ dàng chấp nhận thời gian tham chiếu, vì ID được sử dụng rất phổ biến trong tập lệnh

Thí dụ. Xác định thời gian tương đối giữa các phần tử

...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...

Người dùng có thể làm cho bất kỳ phần tử hoặc dòng thời gian nhất định nào phát lặp đi lặp lại (i. e. vòng lặp), sử dụng các thuộc tính lặp lại. Tác giả có thể chỉ định một số lần để phát thời lượng đơn giản hoặc tổng thời gian để lặp lại dòng thời gian của phần tử

...



...

Âm thanh được đặt để lặp lại vô thời hạn. Hoạt ảnh giới thiệu sẽ lặp lại trong 2 phút rồi dừng. Hoạt hình thứ hai sau đó sẽ bắt đầu và sẽ lặp lại vô thời hạn. Lưu ý rằng các điều khiển lặp lại cũng có thể được kết hợp với phần tử trình tự và dòng thời gian, được mô tả bên dưới

Thuộc tính timeAction cung cấp một phương tiện linh hoạt để xác định ý nghĩa của việc một phần tử hoạt động chứ không phải trên dòng thời gian. Với mục đích kiểm soát trong HTML+TIME, tất cả các phần tử HTML được nhóm thành các danh mục (xem thêm ). Theo mặc định, tất cả các yếu tố được phân loại là nội dung sẽ được kiểm soát bằng thuộc tính khả năng hiển thị. Nghĩa là, trước khi phần tử hoạt động trên dòng thời gian (trước thời gian bắt đầu được xác định), mức độ hiển thị của phần tử sẽ được đặt thành "ẩn". Trong khi phần tử đang hoạt động trên dòng thời gian (từ thời điểm bắt đầu được xác định cho đến khi kết thúc được xác định), thuộc tính khả năng hiển thị sẽ được đặt thành "có thể nhìn thấy". Một lần nữa, sau thời gian kết thúc, thuộc tính khả năng hiển thị sẽ được đặt thành "ẩn". Tất cả các yếu tố phong cách sẽ được kiểm soát bằng cách loại bỏ hiệu ứng của hành vi nội tại của yếu tố. Sẽ thật tuyệt nếu tất cả các thành phần kiểu hỗ trợ thuộc tính "bật" để kiểm soát dễ dàng và theo cách tài liệu tốt

Ví dụ về cách sử dụng timeAction mặc định

...

    This is some text that appears after ten seconds and remains
    visible for 20 seconds.
 
...

    This is some text will appear normally at first, then
    be displayed bold for 10 seconds, and then revert to normal
    display again.

...

...

Ví dụ trên cho thấy hành vi mặc định cho timeActions. Khoảng sẽ bị ẩn khi không hoạt động. Phần tử in đậm sẽ hiển thị nhưng không in đậm khi không hoạt động. Phần tử mở rộng VML cho hình bầu dục sẽ bị ẩn vì nó hỗ trợ thuộc tính khả năng hiển thị

Ví dụ sử dụng giá trị hiển thị

...

    This is some text that appears after ten seconds, and remains
    visible for 20 seconds. When it becomes visible and again when
    it is hidden, the document will reflow.
 
...

Giá trị hiển thị hữu ích khi tác giả muốn tài liệu chỉnh lại dòng theo thời gian. Cái này hữu ích đấy e. g. đối với chuỗi hình ảnh, trong đó chỉ hình ảnh hoạt động mới ảnh hưởng đến bố cục của tài liệu

Ví dụ sử dụng giá trị kiểu

...

    This is some text will appear normally at first, then
    be displayed in red strikethrough for 10 seconds, 
    and then revert to normal display again.
 
...

Giá trị kiểu giúp dễ dàng kiểm soát một tập hợp kiểu phức tạp theo thời gian. Bất kỳ điều khiển kiểu nào có thể được xác định bằng thuộc tính kiểu nội tuyến đều có thể được làm động theo thời gian bằng cách sử dụng cài đặt timeAction này

Ví dụ sử dụng giá trị onOff

...

   
   ...
 
...

Ví dụ này cho thấy việc sử dụng giá trị onOff để kiểm soát hành vi nội tại của kiểu tiện ích mở rộng - trong trường hợp này là phần tử tô cho hình bầu dục trong VML. Hình bầu dục sẽ xuất hiện không tô trong 3 giây và sau đó tô sẽ được áp dụng cho đến khi hình bầu dục bị ẩn sau 10 giây

Các thuộc tính thời gian đơn giản cung cấp một cơ chế rất dễ sử dụng để thêm thời gian đơn giản vào một trang. Rất nhiều hoạt ảnh được hỗ trợ chỉ qua cú pháp đơn giản này. Tuy nhiên, sẽ có trường hợp tác giả muốn xây dựng các cấu trúc thời gian phức tạp hơn và dễ dàng thao tác với chúng. HTML+TIME cung cấp thuộc tính par mới để cấu trúc các phần tử tính thời gian. Điều này giới thiệu một dòng thời gian cục bộ, lồng nhau có thể được thao tác độc lập với thời gian của tài liệu (hoặc cha mẹ). Việc đặt tên xuất phát từ SMIL và là viết tắt của "song song". Có thể có xung đột tiềm ẩn với khái niệm "đoạn văn". Nếu cần, mã thông báo có thể được đổi tên thành "song song" hoặc có thể là "dòng thời gian"

Thẻ bổ sung cũng có thể được giới thiệu, nhưng đây là cách viết cú pháp cho . Người đánh giá?

Một cách sử dụng ví dụ có thể là thiết lập một khối đoạn văn với thời gian được khai báo mà tác giả muốn thao tác như một đoạn hoạt ảnh độc lập (i. e. một dòng thời gian tương đối) trong tài liệu. Thuộc tính par xác định một dòng thời gian tương đối có thể được thao tác như một đơn vị, di chuyển theo thời gian, lặp, cắt và dán, v.v.

Cú pháp thuộc tính dòng thời gian

parXác định ngữ cảnh dòng thời gian tương đối mới với phạm vi của vùng chứa HTML. Đối với mục đích của mô hình thời gian, điều này làm cho phần tử vùng chứa tương đương với phần tử dòng thời gian
Các phần tử được đặt thời gian trong phạm vi vùng chứa sẽ tương đối (có thể là gián tiếp trong trường hợp sử dụng beginWith/beginafter) với ngữ cảnh thời gian mới này, ngoại trừ các phần tử được xác định bằng beginEvent. The timeline container itself is relative to the document root time scope (or to an enclosing timeline container)
Nếu độ trễ bắt đầu và/hoặc thời lượng được xác định cho vùng chứa trình tự, thì toàn bộ vùng chứa sẽ bị ảnh hưởng (e. g. ẩn) trước thời gian bắt đầu và sau khi thời lượng kết thúc
Thuộc tính Boolean - nếu có và TRUE, biến vùng chứa thành vùng chứa dòng thời gian

Một cú pháp thay thế có thể được sử dụng, tương đương với hành vi thời gian. Điều này sử dụng một phần tử mới để xác định dòng thời gian cục bộ. người phản biện. điều này có cần thiết không?

Xác định bối cảnh dòng thời gian tương đối mới. Tất cả các yếu tố thời gian trong phạm vi thời gian sẽ tương đối (có lẽ gián tiếp trong trường hợp sử dụng beginWith/beginafter) với bối cảnh thời gian mới này. Bản thân phần tử dòng thời gian có liên quan đến phạm vi thời gian gốc của tài liệu (hoặc với phần tử dòng thời gian kèm theo)

Thuộc tính phần tử dòng thời gian

Bộ chứa dòng thời gian có thể được tính thời gian theo cách giống như bất kỳ phần tử nào khác. Giá trị offset và/hoặc cơ sở thời gian sẽ bù đắp toàn bộ bối cảnh cục bộ và thay đổi thời gian của mọi thứ trong phạm vi dòng thời gian (ngoại trừ các phần tử được tính giờ cho các sự kiện ngoài phạm vi dòng thời gian)

bắt đầu được xác định. bắt đầuWithDefined
Phần tử được tham chiếu không được nằm trong phạm vi của (i. e. hậu duệ của) dòng thời gian. Nếu một tham chiếu vòng như vậy được phát hiện trong thời gian chạy, thuộc tính sẽ bị bỏ qua và cơ sở thời gian mặc định sẽ được sử dụng thay thế. bắt đầu sau khi xác định
Phần tử được tham chiếu không được nằm trong phạm vi của (i. e. hậu duệ của) dòng thời gian. Nếu một tham chiếu vòng như vậy được phát hiện trong thời gian chạy, thuộc tính sẽ bị bỏ qua và cơ sở thời gian mặc định sẽ được sử dụng thay thế. startEventDefined. durDefined
Nếu thời lượng được áp dụng cho dòng thời gian, toàn bộ khối sẽ bị ẩn trước thời gian bắt đầu và sau khi thời lượng kết thúc. endDefined. endWithDefined
Phần tử được tham chiếu không được nằm trong phạm vi của (i. e. hậu duệ của) dòng thời gian. Nếu một tham chiếu vòng như vậy được phát hiện trong thời gian chạy, thuộc tính sẽ bị bỏ qua và cơ sở thời gian mặc định sẽ được sử dụng thay thế. endSyncXác định phần cuối của bộ chứa dòng thời gian là một chức năng của một hoặc nhiều phần tử thời gian được chứa
Điều này đặc biệt hữu ích khi các phần tử được chứa bao gồm phương tiện có thời lượng hữu hạn nhưng không xác định (e. g. phim mpeg)
Kết thúc sẽ được tính tùy thuộc vào giá trị của thuộc tính
Giá trị pháp lý là. đầu tiênVùng chứa phải kết thúc bằng điểm cuối đầu tiên (sớm nhất) của phần tử được chứa, có thời gian. Tôi. e. ngay khi bất kỳ phần tử được chứa, được định thời gian nào kết thúc, vùng chứa cũng kết thúc. cuối cùngVùng chứa phải kết thúc bằng phần cuối cùng (mới nhất) của phần tử được chứa, được định thời gian. Tôi. e. sau khi tất cả các phần tử được chứa, định thời đã kết thúc, vùng chứa cũng kết thúc. [id-ref]Vùng chứa phải kết thúc bằng phần cuối của phần tử được tham chiếu. Phần tử được tham chiếu phải được chứa trong vùng chứa dòng thời gian hiện tại. Khi mô tả đề cập đến các phần tử "chứa", nên hiểu rằng điều này đề cập đến việc ngăn chặn thời gian chứ không chỉ đơn giản là ngăn chặn HTML. Phần tử div là dòng thời gian có thể chứa các div khác không phải là dòng thời gian; . e. được chứa bởi div dòng thời gian), nếu không có bộ chứa dòng thời gian can thiệp nào trong cấu trúc phân cấp. Hệ thống phân cấp thời gian không cần phải được gắn trực tiếp với hệ thống phân cấp HTML
Giá trị mặc định của "endSync" là "cuối cùng". endEventDefined. lặp lạiXác định
Lưu ý rằng khi điều khiển lặp lại được áp dụng cho dòng thời gian cục bộ, nó không áp dụng lặp lại cho từng phần tử con mà lặp lại chuỗi hành động dưới dạng dòng thời gian. Các phần tử con không được tính thời gian sẽ không bị ảnh hưởng bởi hành động lặp lại. lặp lạiDurDefined
Lưu ý rằng khi điều khiển lặp lại được áp dụng cho dòng thời gian cục bộ, nó không áp dụng lặp lại cho từng phần tử con mà lặp lại chuỗi hành động dưới dạng dòng thời gian. Các phần tử con không được tính thời gian sẽ không bị ảnh hưởng bởi hành động lặp lại. timeActionDefined

ví dụ


    
    

This is some text that appears immediately

This is some text that appears after two seconds

This is some text that appears after three seconds

This is some much more exciting text that appears right away on the new timeline, which does not begin until the first big timeline is done. It should be 10.2 seconds into the page display before you see this...

This is some more exciting text that appears one second into the second timeline, which should be 11.2 seconds after the page Hides up. Just imagine doing a slide show with this stuff...

Đôi khi nảy sinh trường hợp các tác giả muốn có một loạt (e. g. ) hình ảnh xuất hiện. Điều này có thể được thực hiện với các thuộc tính thời gian được mô tả ở trên, nhưng một cú pháp khai báo rất đơn giản được chỉ định để hỗ trợ trường hợp cụ thể này. Thetag được cung cấp cho mục đích này. Lưu ý rằng phần tử này có thể được sử dụng cho các trường hợp khác cũng như trình tự đơn giản, nhưng điều này không được khuyến khích. Một trình tự không phải là một phương tiện mục đích chung tốt để khai báo cấu trúc thời gian khi tài liệu đang được chỉnh sửa - việc thay đổi từ một trình tự được khai báo bằng thẻ sang một mối quan hệ thời gian khác đòi hỏi nhiều công việc hơn là thay đổi các thuộc tính thời gian được liên kết với các phần tử riêng lẻ

Lưu ý cho người đánh giá. Thay vào đó, điều này có nên được trình bày dưới dạng thuộc tính cho vùng chứa, gọi là "dòng thời gian"?

Cú pháp phần tử trình tự

Điều này xác định bối cảnh dòng thời gian tương đối mới. Tất cả các phần tử được tính thời gian trong khối trình tự được tính thời gian theo mặc định như thể chúng có thuộc tính beginafter được đặt thành tiền thân từ vựng được tính thời gian. Bất kỳ thuộc tính cơ sở thời gian nào (bắt đầu bằng hoặc bắt đầu sau) sẽ bị bỏ qua. Tất cả các yếu tố thời gian trong phạm vi trình tự sẽ (ít nhất là gián tiếp) liên quan đến bối cảnh thời gian mới này. The sequence element itself is relative to the document time scope (or to an enclosing timeline element). Lưu ý rằng như với thời gian bắt đầu, nếu bất kỳ phần tử thời gian nào không có thời lượng xác định, tất cả sẽ theo sau (i. e. phụ thuộc) có thể không bao giờ bắt đầu. Lưu ý rằng định nghĩa đề cập đến "tất cả các yếu tố thời gian". Phần tử thời gian là một phần tử HTML có bất kỳ thuộc tính TIME nào được chỉ định (cũng như các phần tử TIME được mô tả trong tài liệu này). Các phần tử không có thuộc tính thời gian sẽ bị cơ chế thời gian bỏ qua và sẽ hoạt động theo cách tĩnh truyền thống
Nếu độ trễ bắt đầu và/hoặc thời lượng được xác định cho vùng chứa trình tự, thì toàn bộ vùng chứa sẽ bị ảnh hưởng (e. g. ẩn) trước thời gian bắt đầu và sau khi thời lượng kết thúc

Thuộc tính phần tử trình tự

Phần tử trình tự có thể được tính thời gian giống như bất kỳ phần tử nào khác. Giá trị offset và/hoặc cơ sở thời gian sẽ bù đắp toàn bộ bối cảnh cục bộ và thay đổi thời gian của mọi thứ trong phạm vi dòng thời gian cục bộ

bắt đầu được xác định. bắt đầuWithDefined
Phần tử được tham chiếu không được nằm trong phạm vi của (i. e. hậu duệ của) dòng thời gian. Nếu một tham chiếu vòng như vậy được phát hiện trong thời gian chạy, thuộc tính sẽ bị bỏ qua và cơ sở thời gian mặc định sẽ được sử dụng thay thế. bắt đầu sau khi xác định
Phần tử được tham chiếu không được nằm trong phạm vi của (i. e. hậu duệ của) dòng thời gian. Nếu một tham chiếu vòng như vậy được phát hiện trong thời gian chạy, thuộc tính sẽ bị bỏ qua và cơ sở thời gian mặc định sẽ được sử dụng thay thế. startEventDefined. durDefined
Nếu một khoảng thời gian được áp dụng cho vùng chứa trình tự, thì toàn bộ vùng chứa sẽ bị ảnh hưởng (e. g. ẩn) trước thời gian bắt đầu và sau khi thời lượng kết thúc. endDefined . endWithDefined
Phần tử được tham chiếu không được nằm trong phạm vi của (i. e. hậu duệ của) dòng thời gian. Nếu một tham chiếu vòng như vậy được phát hiện trong thời gian chạy, thuộc tính sẽ bị bỏ qua và cơ sở thời gian mặc định sẽ được sử dụng thay thế. endEventDefined. repeatDefined
Note that when a repeat control is applied to a local timeline, it does not apply the repeat to each child element, but rather repeats the entire sequence as a timeline. Child elements that are not timed should not be affected by the repeat action. repeatDurDefined
Note that when a repeat control is applied to a local timeline, it does not apply the repeat to each child element, but rather repeats the entire sequence as a timeline. Child elements that are not timed should not be affected by the repeat action. timeActionDefined

Contained (child) tag Attributes

Children of a sequence element can take most of the time attributes, excepting the time base. Reviewers. it appears that it is legal in SMIL to allow children of a seq element to repeat, and potentially to have indefinite duration.   How much flexibility should we allow?  E. g. should we allow endEvent specification? In addition, it may make sense for the default syncBehavior for all sequence children to be locked, so that sequences hold together

beginDefined
This will offset the element from the time base, which is always the end of the timed lexical predecessor. durDefined
If no duration is defined for any child of the sequence block, following children may not display (see also , below). endDefined . endEventDefined . repeatDefined
Note that when a repeat control is applied to a local timeline, it does not apply the repeat to each child element, but rather repeats the entire sequence as a timeline. Child elements that are not timed should not be affected by the repeat action. repeatDurDefined
Note that when a repeat control is applied to a local timeline, it does not apply the repeat to each child element, but rather repeats the entire sequence as a timeline. Child elements that are not timed should not be affected by the repeat action. timeActionDefined

Example. A slide show of images

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
0

Note that this ignores all aspects of layout.   It is up to the HTML author to describe the desired layout (e. g. laid out left to right, stacked with absolute positions, etc. ).   With the timeAction attribute set to "display", the document will reflow over time

Example. A sequence of styles

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
1

Multimedia without interaction is just a movie. It must be possible for the author to describe interactive responses to user actions, and to define timing variants that support interaction.   In this timing model, interactive timing is just a variant in which the begin time is indeterminate.   An element (or an entire timeline container) that should begin in response to some user input is simply defined with a beginEvent.   When the element is not tied to a specific event (e. g. a particular button click or a stream trigger), but rather will be started by script on the page, the element can be defined with  '. beginEvent="none". ' .    Such an element can be started from script using a simple, familiar syntax

Exposed action methods

In order to support interactive control of a timed element, the following methods are exposed to script

beginElement()Starts the element on the timeline.   This applies the same action as finite timing does when the element begin time is reached on the local timeline. When the beginElement() method is called, the element is attached to the local timeline at the current time, plus or minus any defined delay value.   Any time dependents will be notified, and aligned correctly to the local timeline
This method takes no arguments. endElement()Stops the element on the timeline.   This applies the same action as finite timing does when the element stop time is reached on the local timeline. Any time dependents will be notified, and realigned correctly to the local timeline
Note that a sequence of elements can thus be defined with no defined duration, that will sequence correctly if each is stopped interactively using the endElement() method.   This can be combined with the use of durations to create a slideshow that can be advanced with clicks, but that will advance itself after some specified duration
This method takes no arguments

Example script syntax

Authors can simply use the familiar script events (methods) like onclick(), onmouseover(), onmouseout(), etc. to define actions on timed HTML elements.   The script method implementation simply references the timed element by id, and then calls one of the action methods exposed by the element. Note that several possible script solutions are described, just for documentation

Note that the final image is set to begin when the slideshow is complete.   It is possible to set up a timeline of actions that chain off an interactive begin.     The timing for dependent elements is computed when the head of the timing dependency chain is turned on with a trigger

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
2

SMIL introduces the notion of temporal hyperlinks. Rather than create a new element to handle this, we add capabilities to the timing model to support the same functionality.   The implementation must catch navigation events (i. e. docReady events as well as changes to the hash property), and then advance the root timeline to the start time of the hash element.   If the hash element itself is not timed, the element parents are traversed up to the document body to find a timed element.   If the hash element is not contained in any timed block, then the document timeline begins normally. If the hash element is set to begin interactively (with beginEvent="none"), the element is turned on as though it had been triggered and the document timeline plays normally

Timed Hyperlink control Attribute Syntax

In some instances, authors will want to preclude jumping into the middle of a timeline.   One example would be an advertisement before a presentation;  the author may not want the end-user to be able to skip the ad.   A new attribute is supported on the body tag to control this behavior, allowing the author to enable or disable the support

useTimedHyperlinks="true"Sets the current page to make all hyperlinks into the page be timed, advancing the timeline to the start time of the href property.   If there is no href property specified on a link into the page, this attribute has no effect
Setting this to FALSE disables timed hyperlink support into the page, making all links behave as they traditionally would
This is only legal on the BODY tag.   It will be ignored anywhere else
Default value is TRUE

This nice thing about this approach is that it requires no change to the link tag, and can cleanly work even if the link is coming from a page that has no timing defined

The timing syntax primarily addresses relationships among elements on a page.   However, there also a need to define, and to be able to control the start of overall document time. Trong trường hợp đơn giản, có thể chấp nhận thời gian bắt đầu tài liệu khi tài liệu được tải.   However, in particular for long HTML documents it may be unacceptable to defer the document timeline until the document has completely loaded.   Rendering of the first screenful is performed as soon as possible in most browsers, and authors will require that time can be started to run animations, etc. near the top of the page

The model presented here provides simple controls for authors to control the start of document time. By default, document time begins when the document is fully loaded.   This covers many cases, and simplifies the model for novice authors.   Additional settings cause document time to begin either immediately (as soon as possible), or when the document is complete (the document and all associated media and objects have been loaded).   Finally, there is an advanced option for authors to specify the point in the document at which time should begin

Need some examples of usage, and in particular some warnings and examples of trouble they can cause themselves by starting time before document. onLoad

Add attribute to doc root (on body tag) to specify alternatives.   immediate (default), onDocLoad, onDocComplete, onStartTag

Document timeline start  control Syntax

A new attribute is supported to specify the rule for when the document root timeline starts. This attribute is only legal on the body element

Note that if document time begins before the document has fully loaded, the author must define all timing relationships such that the timing relationships are legal when document time begins, and as the rest of the document is parsed.   This means that all timing references to other timed elements (e. g. using beginWith and beginAfter) must refer to elements that are defined earlier in the document.   I. e. authors may not use forward references if document time begins before the document is loaded

timeStartRuleAttribute on body element that defines the desired start time for the root timeline in the document
Legal values are
immediateDocument timeline should start immediately upon instantiation of the document root within the DOM (i. e. as soon as the underlying code gets going)
This is the default setting
onDocLoadDocument timeline should start when the document is fully loaded, but without waiting for any document associated media, etc. This actually ties the start of the document timeline to the window. onload event
onDocCompleteDocument timeline should start only when the document is fully loaded, and all associated media have been loaded. This actually ties the start of the document timeline to the document. readyState changing to "complete"
onStartTag(naming?)Document timeline should start when a startDocumentTimeline element has been parsed and instantiated.   Allows an author to specify how much of a document should be loaded before the document timeline should start

A new (XML) tag is supported to control when document time starts

Defines the point at which document should start.   Only used if the body tag has the  timeStartRule attribute set to onStartTag

Time Scope

For time attributes that reference another timed element (e. g. beginWith, beginAfter), the referenced element must be timed (i. e. it must specify one of the TIME attributes or be a TIME element) and it must be in the current timing scope.   That is, the referenced element must be within the HTML subtree defined by the closest parent time container of the current tag, and must have the same parent time container (i. e. it must be a a time-sibling)

In the absence of timeline attributed containers (or   timeline tags), this will be the document root and all references will be in the same scope.   If a timed element using a reference is within the scope of a timeline container, the scope is the local timeline block.    It is illegal to reference any timed element outside of this scope.   This constraint is imposed to preclude ambiguous and potentially confusing time dependency graphs

Negative Offsets

The model described by HTML+TIME explicitly allows negative offsets.   The common use of these is in something like a sequence, where one object should appear just before another completes.   In this common case, the final computed begin time is still positive.    Nevertheless, there are situations in which a negative computed begin time can obtain; this is not considered illegal

Khi thời gian bắt đầu được tính cho một phần tử là âm so với vùng chứa dòng thời gian, thì phần tử đó được bắt đầu với phần tử gốc (nó không bao giờ có thể xuất hiện hoặc có ảnh hưởng trước khi vùng chứa thời gian thực hiện). Tuy nhiên, mối quan hệ đồng bộ của dòng thời gian cục bộ với phụ huynh được bù đắp. dòng thời gian cục bộ cho phần tử được xác định bắt đầu trước khi nó thực sự xuất hiện và do đó, nó thực sự bắt đầu ở đâu đó ở giữa dòng thời gian của nó.   This can be useful in situations where an element is set to repeat, and the author wants the first repeat iteration to begin in the middle (repeating motion-paths, scrolling, etc. are sometimes authored this way)

Định nghĩa thời gian không hợp lệ

Có thể mô tả mối quan hệ thời gian giữa hoặc giữa các phần tử không hợp lệ. Thông thường, thời gian không hợp lệ vì nó tạo ra các tham chiếu phụ thuộc vào thời gian vòng tròn. Ví dụ: nếu hai phần tử được xác định bắt đầu với nhau (sử dụng cú pháp beginWith hoặc beginEvent), điều này là không hợp lệ.   Invalid timing can result through chained combinations of begin and end timing specification.   Any combination that produces a circular reference is illegal

When an invalid timing specification is detected by the implementation, an error will be generated, and one or all of the elements involved will revert to default timing

If both a duration and any end value (including clip-end) are specified for any element, the effective duration will be the minimum of the specified duration attribute and the computed duration for the specified end attribute

In order to coordinate HTML and time-based media elements on a common timeline, HTML+TIME introduces new tags to easily integrate time-based media. The new media tags will simplify the declaration of time-based media elements over the traditional methods of declaring various plug-ins or other embedded player objects.   It will also manage the exchange of simple timing and control information between HTML+TIME timing implementation and the media players

The tags are defined as XML extensions in the new TIME namespace.   They will be ignored by down-level browsers

Note that the definition of time-based media is not restricted to simple media like audio and video.   Support is also intended for animation media, including extension players for existing popular animation formats.   HTML+TIME would not render these, but would simply coordinate the associated players in the HTML time context

SMIL introduced a set of new tags for a variety of media types.   Currently, the individual tags have no semantic significance over the catch-alltag - the semantics are really tied to the MIME type from the server or specified as an attribute.    However, the use of individual media type tags allows for future extensions such as specific attributes appropriate to individual media types (e. g. audio level).   We would prefer to use "media" in place of "ref", but we can adopt the SMIL naming if desired

The media tags take a src attribute to specify the source-media URL, and an optional specifier for the MIME/media type (the MIME type provided by the server is used by default).   The implementation will associate the type with an appropriate player, and manage the instantiation of a player.   Implementations may handle this e. g. by injecting HTML for an EMBED tag, or it may be handled more deeply.  

There is also a player attribute that supports a reference to EMBED or OBJECT element from the media tags. This allows authors to use the traditional means of declaring the player, in particular to support all the specific attributes and controls of the respective players. The referenced element must support the media player interface described in the object model . This also supports integration of third-party media players with the HTML+TIME model

Note that the declaration of individual media elements with associated time syntax does not preclude the implementation from associating a group of media elements with a single player instance.   It may be desirable from a performance standpoint to combine the media elements into a single grouped-element (e. g. creating a temporary playlist for the associated player).   However, this can have other drawbacks, including a loss of interactive control over individual elements.   The noCombine attribute provides author control over this

Media players must support a basic set of controls to integrate with HTML+TIME.   The implementation or the media tags must present an interface to the media players (e. g. with a wrapper).   The details of the control are provided in the object model discussion 

Note that if no dur attribute is specified, the media wrapper will set the duration property of the element (it is legal to set the duration to indefinite). This will have the side-effect that end-time-dependents (other elements defined with beginAfter referencing this node) will have a defined begin time

Need description of integration of stream-based events with TIME model.   Should require minimal Object Model support, as events fit in like all other events.   Need to discuss recommended support.   Reviewers?

Stream-based events should be raised by the player object, and can be referenced as "object_id. event_name".   When the player object is implicit (e. g. using a video tag), the associated media element should raise the events.   This allows script and HTML+TIME event specifications to respond to all media and server generated events

Media Element Syntax

The tags described here parallel the tags defined in SMIL 1. 0 .    The only difference is the media tag which replaces the generic ref tag in SMIL 1. 0, and the omission of the SMIL text tag, which is subsumed by simple HTML tags for text. Reviewers. what was the intended use of ref, and the naming used?   Unlike SMIL, there is no need for the abstract region reference.   There is a need for reference to a player object, but this is supported as an attribute on all types

Defines an animation element to be incorporated into the document layout and timing.   This may need to be further refined to support specific animation types, allowing player-specific attributes.   For this version, the more generic media element can be used, and the attributes can be specified on the player object. Defines an audio element to be incorporated into the document timing. Depending on the implementation, the position of the audio element may be used to control pan/balance, etc. Duplicates the HTML img tag, supporting more flexible declaration syntax, and some control over media loading.   The syntax supports containment of additional XML tags, for things like motion behaviors.   The implementation can also control the loading of the associated media based upon the defined start time of the element. Defines a generic time-based media element to be incorporated into the document layout and timing. Defines a video element to be incorporated into the document layout and timing.  Defines a time-based text element to be incorporated into the document layout and timing.   Time based text is not well specified, but includes streaming captions, etc

Media Element Attributes

The media element takes the base HTML attributes appropriate to any div tag.   The following are interpreted by the wrapper

srcDefines the source URL of the media.   The extension defines the MIME type
Support is planned for popular video and audio file types, including streaming variants
Value must be a legal URL. imgDefines the URL of an alternate image to be displayed if the MIME type is not supported
This attribute is optional, and only makes sense for visual MIME types.   It is not legal for the img element
Value must be a legal URL. abstractA brief description of the content contained in the element
Value is a string. authorThe name of the author of the content contained in the element
Value is a string. beginDefined . copyrightThe copyright notice of the content contained in the element
Value is a string. beginWithDefined . beginAfterDefined . durDefined
If specified, this will override the natural media duration
If not specified, the duration will be set from the media player, if it is defined. endDefined . endWithDefined . endEventDefined . longdescThis attribute specifies a link (URI) to a long description of a media object. This description should supplement the short description provided using the alt attribute. When the media-object has associated anchors, this attribute should provide information about the anchor's contents. noCombineIf set to true, directs the implementation not to combine this media element into a bundled media stream
Value is a boolean.   Default is false.  playerDirects the implementation to use the referenced object to render the media for this element.   The object must support the media player interface described in the object model section
Value is an id, referring to an object element. repeatDefined
The wrapper will use the media player to make the media repeat, if the media player supports this
Not all media will support this, and an error may be generated (but is not guaranteed). repeatDurDefined
The wrapper will use the media player to make the media repeat, if the media player supports this
Not all media will support this, and an error may be generated (but is not guaranteed). clip-beginThis is aligned closely to the SMIL specification, with minor changes
Note. the name used in SMIL is non-standard for HTML/DOM identifiers.   The SMIL name is used here, but it should perhaps be changed to not use the hyphen
The clip-begin attribute specifies the beginning of a sub-clip of a continuous media object as offset from the start of the media object
Values in the clip-begin attribute have the following syntax.
...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
3

The value of this attribute consists of an optional metric specifier (defaults to "clock"), followed by a time value whose syntax and semantics depend on the metric specifier. The following formats are allowed

SMPTE TimestampSMPTE time codes can be used for frame-level access accuracy. The metric specifier can have the following values. smptesmpte-30-dropThese values indicate the use of the "SMPTE 30 drop" format with 29. 97 frames per second. The "frames" field in the time value can assume the values 0 through 29. The difference between 30 and 29. 97 frames per second is handled by dropping the first two frame indices (values 00 and 01) of every minute, except every tenth minute. smpte-25The "frames" field in the time specification can assume the values 0 through 24

The time value has the format hours. minutes. seconds. frames. subframes. If the frame value is zero, it may be omitted. Subframes are measured in one-hundredth of a frame
Unlike the strictest SMPTE format, TIME will allow for more than two digits in the hours field.   This is specifically to accommodate long format material
Examples

...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
4
...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
5

Clock TimeClock Time (what SMIL calls "Normal Play Time") expresses time in terms of clock values. The metric specifier is "clock", but this is also the default metric, and so the metric specifier may be omitted. The Clock-value syntax is described
Examples
...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
6"
Index valueIndex values (not expressed in SMIL) express a sub-clip start or end not in terms of time, but in terms of an index (e. g. into a character stream). They may only be used on naturally indexed media like textstreams. The metric specifier is "index". Đối số chỉ đơn giản là một số nguyên dương. No sign is allowed on an Index value. If the clip-begin is specified as an Index-value, any clip-end must be as well.   Given the play rate of the textstream, a duration can be computed (the wrapper for the textstream renderer must support query of the duration for a given clip-begin and end)
This is may not seem a natural way of marking a sub-clip, but it is the only reasonable means of marking a character stream.   It is in some ways analogous to the frame specifier for Smpte-times, in that a "frame" in a textstream is a single character, and the frame rate is defined by the textstream itself
SMIL does not define what a textstream is, and it may not be desirable to constrain this definition to match the current implementation within, e. g. Người chơi của RealNetworks.   If the definition of textstream is resolved to include specifics of time and/or logical named markers, this attributed may be deleted in favor of the time and timeID values
Examples
...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
7
timeID valuetimeID values are simply named points in a media stream.   These are only supported by some players, and so are specific to certain MIME types (e. g. newer ASF). The strings are passed into the player, which can map the names to specific points defined as part of the authored media stream
Examples
...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
8clip-endThe clip-end attribute specifies the end of a sub-clip of a continuous media object (such as audio, video or another presentation) that should be played. It uses the same attribute value syntax as the clip-begin attribute
If the value of the "clip-end" attribute exceeds the duration of the media object, the value is ignored, and the clip end is set equal to the effective end of the media object
Note that use of clip-end will define a duration. This may override the natural duration of the media itself
In SMIL, no mention is made of how to handle a negative duration (i. e. clip-end < clip-begin)
The media tag will ignore a clip-end if it defines a negative or 0-length duration
If a clip-end is specified without a clip-begin, the clip-begin should be computed from the defined duration.   If no duration is otherwise defined, the clip-end will be ignored
If the clip-end defines a duration (with a clip-begin) and any other duration is defined, the minimum duration is used (see also below)
Note. the name used in SMIL is non-standard for HTML/DOM identifiers.   The SMIL name is used here, but it should perhaps be changed to not use the hyphen. titleThis attribute offers advisory information about the element for which it is set. Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers frequently display the title as a "tool tip" (a short message that appears when the pointing device pauses over an object)
Value is a string. typeOptional MIME/media type of the media object referenced by the "src" attribute
The default mechanism should be to get the MIME type from the server
If this fails, the type attribute can specify the MIME type
If this is missing, and if the src URL includes an extension, an attempt should be made to determine the type from the URL extension, if such a mapping is defined on the platform
Value is a string

SMIL references a textstream media element, but does not in any way define or describe it.   Simple cases could be handled with HTML using timing markup. Nevertheless, having a separate media type has advantages when streaming a large amount of content - e. g. captions to a lengthy audio presentation.  

The specification of a "textstream" must be formalized before it can be widely supported by media players

To integrate timeline media and animation into the page, authors must have control over the synchronization behavior of the page.   In addition, authors need to be able to define how time behaves relative to the initial loading or cueing of media.   HTML+TIME unifies support for asynchronous media loading and dynamic resynchronization of players into a simple concept of sync rules and scope. HTML+TIME defines additional attributes for media elements, as well as a general mechanism for managing dynamic synchronization of timeline elements

This level of support requires a means to specify which media elements must be ready (i. e. loaded or cued) in order to play a portion of an animation timeline.   This allows the author to control when the page or any local timeline (e. g. a div) starts, relative to the media that is required.   The author can force the page to wait for all media to be ready.   Alternatively, the author can specify that a timeline (e. g. the main page timeline) can begin when certain specific media elements are ready, but before all media has been prepared.   The author can define and control the end-user experience

Dynamic synchronization support provides an author the means to define which elements must remain in tight synchronization, and which elements (or local timelines) can slip if the players cannot keep up (e. g. due to network congestion).   This provides a balance between the requirements of coordinating an animation and the realities of network media delivery

Functional model in HTML+TIME

The author's model will be very simple. they can describe the synchronization behavior of each media element and of each time container. By definition, synchronization includes the startup sync relationship; allowing an element to slip sync provides control over media loading. By describing the sync behavior of time containers, authors can control the scope of a synchronization context.   When the timing model must handle resync events (i. e. when a media player falls out of sync while playing), the sync rules of the time containers define how far-reaching the resync handling will be

In addition, authors can describe how to fill in for elements that are not ready to play at the time they were originally authored to

Synchronization Attribute syntax

syncBehaviorAttribute trên các phần tử Phương tiện và vùng chứa thời gian xác định các yêu cầu đồng bộ hóa cho dòng thời gian được liên kết
Legal values are
canSlipCho phép nút được liên kết trượt trên dòng thời gian chính. Đặt thuộc tính thành giá trị này có nghĩa là nếu phương tiện chưa sẵn sàng khi dòng thời gian bắt đầu, thì nút này có thể chờ (trượt trên dòng thời gian gốc) cho đến khi phương tiện sẵn sàng và bắt đầu tại thời điểm đó. Đối với vùng chứa thời gian, "phương tiện" đề cập đến phương tiện cho tất cả các phần tử được chứa. Đặt thuộc tính thành giá trị này cũng có nghĩa là nếu người chơi trượt đồng bộ hóa trong khi chơi, bạn có thể để phần tử này xác định lại mối quan hệ đồng bộ hóa với dòng thời gian chính. Đối với vùng chứa thời gian, điều đó có nghĩa là nếu bất kỳ phần tử nào trong phạm vi thời gian được chứa không đồng bộ hóa thì vùng chứa thời gian có thể xác định lại đồng bộ hóa với dòng thời gian gốc (điều này xác định hiệu quả phạm vi lan truyền đồng bộ hóa lại)
Đây có thể sẽ là cài đặt mặc định cho tất cả các nút. Điều này cho phép một trang có đồng bộ hóa rất lỏng lẻo và cho phép tự do nhất để xử lý các sự cố mạng, v.v.
bị khóaBuộc nút được liên kết duy trì đồng bộ hóa trên dòng thời gian gốc. Điều này có thể được giảm bớt bằng cách sử dụng thuộc tính syncTolerance. Việc đặt thuộc tính thành giá trị này có nghĩa là nếu phương tiện chưa sẵn sàng khi dòng thời gian bắt đầu, thì bộ chứa thời gian chính phải chờ (không bắt đầu) cho đến khi phương tiện sẵn sàng. Đối với vùng chứa thời gian, "phương tiện" đề cập đến phương tiện cho tất cả các phần tử được chứa. Đặt thuộc tính thành giá trị này cũng có nghĩa là nếu trình phát trượt đồng bộ hóa trong khi chơi, phần tử không thể trượt so với dòng thời gian gốc. Cấp độ gốc phải giải quyết sự trượt giá để duy trì đồng bộ hóa trên dòng thời gian. Điều này không bắt buộc một cách tiếp cận cụ thể để duy trì đồng bộ hóa. Các phương tiện được đề xuất bao gồm
  • Tạm dừng dòng thời gian gốc cho đến khi phần tử trượt có thể "bắt kịp" dòng thời gian gốc
  • Pausing the element that slipped (only if it somehow got ahead of the parent timeline) until the parent timeline catches up
  • Tiếp nhận (tôi. e. đặt lại vị trí hiện tại của) phần tử bị trượt, nhảy lên phía trước để nó "bắt kịp" dòng thời gian gốc

Đối với vùng chứa thời gian, syncBehavior="locked" có nghĩa là dòng thời gian cục bộ phải vẫn bị khóa với dòng thời gian gốc. Nếu các phần tử trong vùng chứa thời gian được xác định bằng syncBehavior="canSlip", cài đặt vùng chứa thời gian không ghi đè cài đặt phần tử được chứa. Điều này chỉ xác định mối quan hệ đồng bộ hóa của vùng chứa thời gian với cha mẹ
Note that the most common approach to resolving sync problems will be to pause the parent timeline. Tuy nhiên, nếu cấp độ gốc cũng được xác định với đồng bộ hóa bị khóa, thì quá trình đồng bộ hóa lại phải được truyền lên cây thời gian cho đến khi đạt đến cấp độ gốc đã xác định đồng bộ hóa trượt hoặc cho đến khi đạt đến nội dung tài liệu. Trong trường hợp định nghĩa thời gian bị khóa hoàn toàn, toàn bộ dòng thời gian của trang sẽ bị tạm dừng nếu bất kỳ phần tử nào không đồng bộ hóa và phát sinh sự kiện đồng bộ hóa lại


syncToleranceAttribute trên các phần tử Phương tiện và vùng chứa thời gian xác định dung sai đồng bộ hóa cho dòng thời gian được liên kết. This is only used if the same element has syncBehavior=locked. Điều này cho phép mối quan hệ đồng bộ hóa bị khóa bỏ qua một chút xoay mà không buộc sự kiện đồng bộ hóa lại
Giá trị pháp lý là giá trị giây như được xác định trong thông số HTML+TIME (i. e. một số nguyên hoặc số dấu phẩy động của giây). Có thể có một giá trị mặc định khác không cho thuộc tính này, được xác định thông qua thử nghiệm (tôi đoán giá trị nào đó nằm trong khoảng từ 0. 1 giây và 0. 5 giây). Điều này nên được ghi lại trong mô hình đối tượng
fillAttribute trên bất kỳ phần tử nào xác định hành vi khi thời lượng phải được kéo dài để tính đến thời gian phụ thuộc chưa sẵn sàng để bắt đầu. Điều này cho phép một phần tử phát lâu hơn thời lượng đã xác định để "bảo vệ" một phần tử đang trượt trên dòng thời gian cho đến khi phương tiện được liên kết sẵn sàng phát
Legal values are
mở rộngLàm cho phần tử tiếp tục phát bằng cách kéo dài thời lượng. Điều này phù hợp với các phần tử tĩnh và các vùng chứa thời gian có các phần tử tĩnh và/hoặc lặp lại trong dòng thời gian. Nếu bản thân phần tử được đặt để lặp lại, điều này sẽ có tác dụng tương tự như giá trị lặp lại, bên dưới
lặp lại Làm cho phần tử tiếp tục phát bằng cách lặp lại thời lượng. Điều này phù hợp với các phần tử có dòng thời gian phù hợp để lặp lại. Nếu phần tử đã được đặt để lặp lại, hành vi lặp lại hiện tại sẽ được tiếp tục (e. g. lặp lại một phần ở cuối sẽ được hoàn thành và không được khởi động lại)
freezeLàm cho phần tử tiếp tục phát bằng cách đóng băng (i. e. giữ) dòng thời gian địa phương vào thời điểm kết thúc. Điều này phù hợp với các phần tử tĩnh và đối với các phần tử không thể lặp cũng như không tiếp tục phát
removeLàm cho phần tử hoàn thành bình thường và hoàn toàn không kéo dài thời lượng
Đây là mặc định

Note that the behavior is only used when a direct exit-time dependent is not ready to play. Nếu một phụ thuộc của một phụ thuộc chưa sẵn sàng hoặc nếu một phụ thuộc được xác định tương ứng với điểm bắt đầu của phần tử hiện tại, thì không có hành vi điền nào được sử dụng

Lưu ý rằng khi phần tử có nhiều yếu tố phụ thuộc thời gian, hành vi điền sẽ được sử dụng nếu bất kỳ yếu tố phụ thuộc nào không thể bắt đầu đúng giờ (không đồng bộ hóa). Không có cách nào để xác định hành vi điền cho từng người phụ thuộc vào thời gian. Một ví dụ về sự cố tiềm ẩn là một hình ảnh hiển thị trong vài giây và theo sau là video và một số âm thanh. Giả sử hình ảnh được đặt để lấp đầy với ý định che cho video cho đến khi nó sẵn sàng. Nếu cả video và âm thanh được xác định là bắt đầu khi hình ảnh kết thúc (beginafter="image_id") và nếu âm thanh chưa sẵn sàng để bắt đầu thì hình ảnh sẽ tiếp tục hiển thị cho đến khi âm thanh sẵn sàng. Trong trường hợp này, tác giả nên xác định âm thanh bắt đầu bằng video và chỉ tạo video phụ thuộc trực tiếp vào hình ảnh

Cài đặt mặc định Cú pháp thuộc tính

syncBehaviorDefaultSets the default sync behavior for all elements on the page. Điều này chỉ có thể được áp dụng cho phần tử cơ thể. Các giá trị pháp lý giống như đối với thuộc tính syncBehavior
Điều này cũng có thể được xử lý bằng cách làm cho syncBehavior kế thừa từ cha mẹ (nếu không được chỉ định). Đặt thuộc tính trên nội dung tài liệu sau đó có tác dụng tương tự. syncToleranceDefaultĐặt giá trị dung sai đồng bộ hóa mặc định cho tất cả các thành phần trên trang. Chỉ được sử dụng nếu syncBehavior cho một phần tử bị "khóa" (theo cài đặt mặc định hoặc theo thuộc tính trên phần tử). This may only be applied to the body element. Legal values are the same as for the syncTolerance attribute
Điều này cũng có thể được xử lý bằng cách làm cho syncBehavior kế thừa từ cha mẹ (nếu không được chỉ định). Đặt thuộc tính trên nội dung tài liệu sau đó có tác dụng tương tự

Trường hợp sử dụng ví dụ

Cần ví dụ về việc sử dụng hành vi điền

Theo mặc định, mọi thứ sẽ đồng bộ lỏng lẻo. Điều này cho phép tác giả bỏ qua các vấn đề với việc duy trì đồng bộ hóa giữa tất cả các phần tử. Điều này cũng cho phép tất cả người chơi có nhiều thời gian nhất

Thí dụ. đồng bộ hóa âm thanh và video với nhau, độc lập với phần còn lại của trang

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
4

Quá trình đồng bộ hóa video và âm thanh bị khóa, nghĩa là dòng thời gian cục bộ không thể bắt đầu cho đến khi phương tiện cho cả hai thành phần sẵn sàng phát hành. Ngoài ra, nếu một trong hai trình phát gặp sự cố trong khi phát lại, vùng chứa chính phải duy trì đồng bộ hóa

Đồng bộ hóa dòng thời gian được xác định là trượt, điều đó có nghĩa là phần còn lại của dòng thời gian tài liệu sẽ không được duy trì khi phương tiện video và âm thanh đang tải/tín hiệu. Điều đó cũng có nghĩa là bất kỳ sự kiện đồng bộ hóa lại nào được yêu cầu bởi một trong các trình phát video hoặc âm thanh bị mất đồng bộ hóa, sẽ buộc dòng thời gian giải quyết quá trình đồng bộ hóa, nhưng không truyền sự kiện đồng bộ hóa lại đến dòng thời gian gốc (có thể là dòng thời gian gốc của tài liệu)

Thí dụ. phát trực tuyến video liên quan đến một trang hoạt hình và giữ đồng bộ hóa một cách lỏng lẻo

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
5

Video được đặt để bắt đầu phát 5 giây sau khi dòng thời gian của tài liệu bắt đầu và để giữ đồng bộ hóa +/- 2 giây với dòng thời gian của tài liệu. Điều này cho phép các hoạt ảnh khác trên trang đồng bộ với video. Nếu video không đồng bộ quá 2 giây, thời gian thực hiện (ở cấp độ tài liệu) phải đồng bộ lại video (e. g. bằng cách tạm dừng dòng thời gian gốc hoặc dòng thời gian của video cho đến khi chúng được căn chỉnh chặt chẽ hơn)

Sử dụng hành vi đồng bộ hóa và thời gian tương tác

Nếu một phần tử được xác định để bắt đầu tương tác (e. g. chỉ định startEvent), syncBehavior có cách giải thích được sửa đổi một chút. Trong trường hợp này, không có mối quan hệ đồng bộ ban đầu nào được xác định giữa phần tử và vùng chứa thời gian. Như vậy, khi phần tử được bắt đầu (e. g. thông qua tập lệnh trên một nút), mối quan hệ đồng bộ hóa sẽ được truyền đến các thành phần phụ thuộc thời gian, nhưng không có sự kiện đồng bộ hóa lại nào được truyền đến vùng chứa thời gian. Tuy nhiên, khi phần tử đã được bắt đầu và mối quan hệ đồng bộ hóa đã được thiết lập, thì syncBehavior của phần tử sẽ xác định cách đối tượng sẽ duy trì đồng bộ hóa. Do đó, một phần tử có thể được xác định để bắt đầu tương tác (với đồng bộ hóa không xác định) nhưng để duy trì đồng bộ hóa sau khi bắt đầu. Đây có lẽ không phải là một kịch bản tác giả phổ biến

Sự cố trình phát đa phương tiện

Người ta cho rằng trình phát phương tiện và tiện ích mở rộng cung cấp mức kiểm soát cơ bản được mô tả là mức tối thiểu để tích hợp

Một ứng dụng mới nổi của HTML kết hợp trình duyệt web với truyền hình, dưới dạng truyền hình truyền thống hoặc ở dạng kỹ thuật số như DVD (e. g. xem thông số ATVEF. HTML+TIME là một công cụ lý tưởng cho các ứng dụng này, cung cấp phương tiện kiểm soát thời gian và đồng bộ hóa trong trang web đi kèm với nội dung truyền hình. Một số công cụ được cung cấp để tích hợp HTML+TIME với các ứng dụng như ATVEF

  • Thuộc tính beginEvent cho phép các phần tử được liên kết với sự kiện máy chủ hoặc sự kiện truyền trực tuyến được phân phối cùng với nội dung truyền hình. Điều này giúp dễ dàng tạo nội dung HTML được gắn với các điểm đồng bộ hóa trong nội dung truyền hình - không cần viết kịch bản
  • Thuộc tính clockSource mới, được mô tả bên dưới. Điều này cho phép tác giả khóa thời gian trên trang web với nội dung truyền hình. Video về cơ bản xác định thời gian cho trang

cú pháp thuộc tính

clockSourceBoolean thuộc tính trên các phần tử phương tiện và vùng chứa thời gian buộc đồng hồ của trang đồng bộ hóa với dòng thời gian cục bộ
Giá trị mặc định là sai
Thuộc tính được liên kết là chỉ đọc và không thể được đặt theo tập lệnh
Nếu được đặt thành true, đồng hồ trang sẽ khóa theo dòng thời gian cục bộ khi nó đang hoạt động (ngay cả khi nó bị tạm dừng). Khi dòng thời gian cục bộ không hoạt động (i. e. trước khi nó bắt đầu và sau khi nó kết thúc), đồng hồ trang sẽ không bị ảnh hưởng
Nếu nhiều phần tử có thuộc tính clockSource được đặt thành true và cả hai phần tử đều đang hoạt động tại bất kỳ thời điểm nào, thì phần tử xuất hiện sau trong tài liệu sẽ chiếm ưu thế.  

SMIL giới thiệu khái niệm về các thuộc tính có điều kiện và cấu trúc chuyển đổi được xây dựng dựa trên các thuộc tính có điều kiện. Đây là những cấu trúc có giá trị cho nhiều ứng dụng và được bao gồm để hỗ trợ HTML trong trình duyệt web

Cú pháp được mô tả bên dưới phần lớn được lấy từ đặc tả SMIL. Các tiện ích mở rộng nhỏ cho SMIL được mô tả để khái quát hóa hỗ trợ cho HTML và môi trường trình duyệt

Thuộc tính kiểm tra cung cấp phương tiện bật hoặc tắt phần tử dựa trên một số tham số hệ thống được xác định trước. Nếu biểu thức kiểm tra một tham số cụ thể đánh giá đúng, phần tử được hiển thị bình thường. Nếu biểu thức đánh giá sai, thì phần tử bị bỏ qua (e. g. bị xóa khỏi cây DOM) và sẽ không được hiển thị

Trong ngữ cảnh của SMIL,  các trường hợp sử dụng mô tả việc phân phối có điều kiện các dạng nội dung khác nhau, dựa trên các điều kiện tích hợp liên quan đến băng thông mạng, kích thước và độ sâu của màn hình, ngôn ngữ hệ thống và nhiều tùy chọn khác của người dùng. Trong ngữ cảnh của một số trình phát phương tiện chuyên dụng, tùy chọn người dùng được liên kết với trình kết xuất SMIL. Một số thuộc tính có thể được ánh xạ trực tiếp tới cài đặt hệ thống hoặc giá trị mặc định hợp lý trên hầu hết các nền tảng (e. g. ngôn ngữ). Liên kết một số tùy chọn người dùng (e. g. đối với tốc độ thông thường của kết nối mạng) ít trực tiếp hơn đối với các trình duyệt

Giải pháp được đề xuất là hỗ trợ các giá trị mặc định điển hình cho tất cả các tham số và cho phép các tùy chọn cụ thể trong môi trường.   The preferences should be made available in the DOM (e. g. làm thuộc tính của cửa sổ hoặc tài liệu). Trình cài đặt trình duyệt có thể đặt các giá trị này và/hoặc một trang biểu mẫu đơn giản hoặc trang tương đương sẽ cho phép người dùng đặt các giá trị thuộc tính thử nghiệm

Các thuộc tính được SMIL hỗ trợ bao gồm (được lấy từ thông số SMIL, với các mô tả mà nó cung cấp và các ghi chú bổ sung in nghiêng)

system-bitrate Thuộc tính này chỉ định băng thông gần đúng, tính bằng bit trên giây có sẵn cho hệ thống. Phép đo băng thông dành riêng cho ứng dụng, nghĩa là ứng dụng có thể sử dụng phép đo tinh vi của kết nối đầu cuối hoặc cài đặt tĩnh đơn giản do người dùng kiểm soát. Trong trường hợp sau, điều này chẳng hạn có thể được sử dụng để đưa ra lựa chọn dựa trên kết nối của người dùng với mạng. Các giá trị điển hình cho người dùng modem sẽ là 14400, 28800, 56000 bit/s, v.v. Đánh giá là "true" nếu tốc độ bit hệ thống khả dụng bằng hoặc lớn hơn giá trị đã cho. Đánh giá là "sai" nếu tốc độ bit hệ thống có sẵn thấp hơn giá trị đã cho
Thuộc tính có thể nhận bất kỳ giá trị số nguyên nào lớn hơn 0. Nếu giá trị vượt quá giá trị băng thông tối đa do triển khai xác định, thì thuộc tính luôn đánh giá là "false"
Người triển khai nên hỗ trợ điều này với giá trị cấu hình tĩnh, thay vì một số phép đo động. system-captionsThis attribute allows authors to distinguish between a redundant text equivalent of the audio portion of the presentation (intended for a audiences such as those with hearing disabilities or those learning to read who want or need this information) and text intended for a wide audience. The attribute can has the value "on" if the user has indicated a desire to see closed-captioning information, and it has the value "off" if the user has indicated that they don't wish to see such information. Evaluates to "true" if the value is "on", and evaluates to "false" if the value is "off". system-languageThe attribute value is a comma-separated list of language names as defined in [RFC1766]

Evaluates to "true" if one of the languages indicated by user preferences exactly equals one of the languages given in the value of this parameter, or if one of the languages indicated by

user preferences exactly equals a prefix of one of the languages given in the value of this parameter such that the first tag character following the prefix is "-"

Evaluates to "false" otherwise

Note. This use of a prefix matching rule does not imply that language tags are assigned to languages in such a way that it is always true that if a user understands a language with a certain tag, then this user will also understand all languages with tags for which this tag is a prefix

The prefix rule simply allows the use of prefix tags if this is the case

Implementation note. When making the choice of linguistic preference available to the user, implementers should take into account the fact that users are not familiar with the details of language matching as described above, and should provide appropriate guidance. As an example, users may assume that on selecting "en-gb", they will be served any kind of English document if British English is not available. The user interface for setting user preferences should guide the user to add "en" to get the best matching behavior

Multiple languages MAY be listed for content that is intended for multiple audiences. For example, a rendition of the "Treaty of Waitangi", presented simultaneously in the original Maori and English versions, would call for

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
6

However, just because multiple languages are present within the object on which the system-language test attribute is placed, this does not mean that it is intended for multiple linguistic audiences. An example would be a beginner's language primer, such as "A First Lesson in Latin," which is clearly intended to be used by an English-literate audience. In this case, the system-language test attribute should only include "en"

Authoring note. Authors should realize that if several alternative language objects are enclosed in a "switch", and none of them matches, this may lead to situations such as a video being shown without any audio track. It is thus recommended to include a "catch-all" choice at the end of such a switch which is acceptable in all cases

system-overdub-or-captionThis attribute is a setting which determines if users prefer overdubbing or captioning when the option is available. The attribute can have the values "caption" and "overdub". Evaluates to "true" if the user preference matches this attribute value. Evaluates to "false" if they do not match. system-requiredThis attribute specifies the name of an extension. Evaluates to "true" if the extension is supported by the implementation, otherwise, this evaluates to "false". In a future version of SMIL, this attribute value will be an XML namespace
This could be very useful (e. g. to control support for 3-D content if an accelerator is installed), however this requires more work to describe an XML namespace mechanism for identifying hardware or software components. system-screen-sizeAttribute values have the following syntax
screen-size-val . = screen-height"X"screen-width
Each of these is a pixel value, and must be an integer value greater than 0.  Evaluates to "true" if the SMIL playback engine is capable of displaying a presentation of the given size. Evaluates to "false" if the SMIL playback engine is only capable of displaying a smaller presentation. system-window-sizeAttribute values have the following syntax
window-size-val . = window-height"X"window-width
Each of these is a pixel value, and must be an integer value greater than 0.  Evaluates to "true" if the current browser window (i. e. enclosing frame) is at least as large as the given size. Evaluates to "false" if the current browser window smaller. system-screen-depthThis attribute specifies the depth of the screen color palette in bits required for displaying the element. The value must be greater than 0. Typical values are 1, 8, 24 . Evaluates to "true" if the browser platform is capable of displaying images or video with the given color depth. Evaluates to "false" if the browser platform is only capable of displaying images or video with a smaller color depth

The switch element allows an author to specify a set of alternative elements from which only one acceptable element should be chosen. An element is acceptable if the element is an HTML element, if any associated media-type can be decoded , and all of the of the element evaluate to "true".  

An element is selected as follows. the parser evaluates the elements in the order in which they occur in the switch element. The first acceptable element is selected at the exclusion of all other elements within the switch

Thus, authors should order the alternatives from the most desirable to the least desirable. Furthermore, authors should place a relatively fail-safe alternative as the last item in theso that at least one item within the switch is chosen (unless this is explicitly not desired). Implementations should NOT arbitrarily pick an object within awhen test-attributes for all fail

Note that http URIs provide for content-negotiation, which may be an alternative to using the "switch" element in some cases

Element Content

The switch element should be able to contain any HTML content

ví dụ

These examples are taken directly from the SMIL 1. 0 specification.    

1) Choosing between content with different bitrate

In a common scenario, implementations may wish to allow for selection via a "system-bitrate" parameter on elements. The media player evaluates each of the "choices" (elements within the switch) one at a time, looking for an acceptable bitrate given the known characteristics of the link between the media player and media server

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
7

2) Choosing between audio resources with different bitrate

The elements within the switch may be any combination of elements. For instance, one could merely be specifying an alternate audio track

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
8

3) Lựa chọn giữa các nguồn âm thanh ở các ngôn ngữ khác nhau

In the following example, an audio resource is available both in French and in English. Based on the user's preferred language, the player can choose one of these audio resources

...

This is a paragraph of text that appears after one second

This is a paragraph of text that appears after two seconds

This is a paragraph of text that appears after three seconds

...
8

4) Choosing between content written for different screens

In the following example, the presentation contains alternative parts designed for screens with different resolutions and bit-depths. Depending on the particular characteristics of the screen, the player can choose one of the alternatives

...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
0

This is a list of miscellaneous SMIL elements which may need to be supported.   The relevant portions of the SMIL spec are included here

Note. for a list of SMIL elements that will not be supported, and for specific differences between SMIL and TIME extensions, see

The meta element

The "meta" element can be used to define properties of a document (e. g. , author, expiration date, a list of key words, etc. ) and assign values to those properties. Each "meta" element specifies a single property/value pair

Element Attributes

The "meta" element can have the following attributes

contentThis attribute specifies the value of the property defined in the meta element
The "content" attribute is required for "meta" elements. nameThis attribute identifies the property defined in the meta element
The "name" attribute is required for "meta" elements. skip-contentThis attribute is introduced for future extensibility of SMIL. It is interpreted in the following two cases
  • If a new element is introduced in a future version of SMIL, and this element allows SMIL 1. 0 elements as element content, the "skip-content" attribute controls whether this content is processed by a SMIL 1. 0 player
  • If an empty element in SMIL version 1. 0 becomes non-empty in a future SMIL version, the "skip-content" attribute controls whether this content is ignored by a SMIL 1. 0 player, or results in a syntax error

Nếu giá trị của thuộc tính "skip-content" là "true" và áp dụng một trong các trường hợp trên, thì nội dung của phần tử sẽ bị bỏ qua. Nếu giá trị là "false", nội dung của phần tử được xử lý
Giá trị mặc định cho  "skip-content" là "true"

The list of properties is open-ended. This specification defines the following properties

pics-label or PICS-LabelThe value of this property specifies a valid rating label for the document as defined by PICS

Element Content

"meta" is an empty element

There was a general issue related to the parameter specification syntax in the HTML+TIME specification. This has been largely resolved, but the alternatives are described here for context

The document currently presents one syntax to illustrate the model and provide simple examples in HTML.   As the chosen syntax is based upon a draft specification, it may change.   Nevertheless, the syntax changes, if any, will not materially affect the model of time containment in HTML documents

In addition, this document describes the use of embedded XML elements in the HTML.   This has been referred to as "XML sprinkles".   While this is not part of a current standard, it has been discussed in a related note

This version of the document presents a model of syntax that defines parameters using XML Namespace qualified attributes. The new XML Namespace proposal allows for extension attributes that are qualified with a namespace id.   This provides the cleanest syntax, and is used with this document. Nevertheless, at this point the XML Namespace proposal is only a draft

It might be argued that simple html "expando" attributes would be easiest for authors to use. Such a syntax imposes minimal changes to the HTML that they author today.   However, expandos are problematic in that they violate the HTML DTD (despite the fact that both major browsers parse them without problems).  

An alternative syntax was proposed that moves the parameters to a STYLE string.   These STYLE-expandos are HTML DTD compliant, and CSS specifies that unknown attributes be ignored, making this a reasonable syntax. This was rejected as less elegant than the XMLNS expando syntax

E. g. where this document describes parameters as XMLNS expandos

...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
1

the syntax with STYLE-expandos would look like

...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
1

and the syntax with simple expando attributes would look like

...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
1

It should be possible to support SMIL 1. 0 compliant documents using HTML+TIME.  The layout mechanisms of SMIL can be translated to CSS2, and the timing constructs translate directly. A relatively simple extension could support such a translation mechanism.   This could even be placed within an alternate clause in a switch statement, if the browser supports HTML+TIME extensions

Because of the asynchronous nature of loading the SMIL file, there may be some issues related to synchronization with the rest of the document.   In all likelihood, the start of the SMIL timeline would normally be deferred relative to the rest of the document, but this can be easily controlled with the synchronization control facilities in HTML+TIME

Layout within the SMIL document will be achieved using standard CSS functionality.    The SMIL syntax describes a subset of CSS, and so no extensions should be required.   See also the related W3C note . The output HTML would likely be wrapped in a div (i. e. the SMIL. import tag should essentially subclass div).   The SMIL specification provides for a declaration of the dimensions of the presentation; these will define the default dimensions of the wrapping div. How should the declared dimensions interact with the use of the screen-size test-attribute?

Finally, note that any SMIL renderer that supports the defined interface for media players can be hosted as an object (or embed) on the page.   In this way, a pure SMIL 1. 0 presentation can be placed in the web browser context for timing and synchronization with an HTML page

Note that the translation is only for rendering, and not for editing.   As such, there is no requirement for retaining the full fidelity of SMIL information, as long as the media is correctly rendered. Certain SMIL attributes have no presentation function and these need not be preserved in the translation

Need to formally document the exposed methods, the events and the way the timing model will handle resync events. This is still rough, and needs further discussion and review. This is incomplete, but gives an idea of where we are going

Methods

beginElement()Turns on the behavior, starting the local timeline. Fires an onBegin event and propagates time dependencies. endElement()Turns off the behavior, stopping the local timeline. Fires an onEnd event.   If the element is stopping prematurely (i. e. before the defined end time) this also raises an onResync event and propagates time dependencies. Note that turnOff is different from pause().   Unlike pause, turnOff is used to advance to the end of the local timeline, as though the element had played to the end. cue()Returns a boolean to indicate whether the element is ready to display (e. g. img media is ready).   Time containers return an aggregate of all descendents.   Todo. need to include notes on interaction of sync rules and cue state. pause()Pauses the local timeline, and raises an onResync event. run()Resumes a paused timeline.   If the element was not paused, this has no effect. localToGlobalTime( int ltime, string elementid )Convert from a local time to a global time in the referenced time space.   Returns an integer indicating the count of milliseconds that represents the local time ltime in the time space of the ancestor timeline specified by elementid.   If elementid is null, this converts from the local timeline to the document global timeline.   This is useful both for authoring applications as well as aligning or otherwise relating elements on disparate timelines.   Note that ltime need not be within the constraints of the local duration.   The conversion is always done relative to the simple local duration; to convert a simple local time in iteration n of a repeating timeline, the caller must account for the offset of n-1 simple durations

Properties

The following properties will be supported.   Some platforms may fire property change events, as an alternative means of wiring time-based script or other functions to the local timeline. The list below does not indicate legal elements for the different properties

The properties for defining the basic timing are read-only.   The model supports run-time modification only through the methods defined and the currTime property

For numeric timing properties, the values are the effective values.   Thus, if no dur or end attributes are specified, the dur and end properties will be infinite, and if no begin attribute is specified, the value will be 0

abstractstring, read-only. authorstring, read-only. beginfloating point number (seconds), read-only. beginWithstring (element id), read-only. beginAfterstring (element id), read-only. beginEventstring (element id ". " event id), read-only. clip-beginstring, read-only. clip-endstring, read-only. clockSourceboolean, read-only. copyrightstring, read-only. durfloating point number (seconds) or POSITIVE_INFINITY if indefinite, read-only. endfloating point number (seconds) or POSITIVE_INFINITY if indefinite, read-only. endWithstring (element id), read-only. endEventstring (element id ". " event id), read-only. endSyncstring, read-only. fillstring, read-only. longdescstring, read-only. noCombineboolean, read-only. playerstring (id), read-only. parboolean, read-only. repeatfloating point number (seconds) or POSITIVE_INFINITY if indefinite, read-only. repeatDurfloating point number (seconds) or POSITIVE_INFINITY if indefinite, read-only. skip-contentboolean, read-only. syncBehaviorstring, read-only. syncBehaviorDefaultstring, read-only. syncTolerancefloating point number (seconds), read-only.   Only valid if syncBehavior set to "locked"syncToleranceDefaultfloating point number (seconds), read-only.   Only valid if syncBehavior set to "locked"timeActionstring, read-only. timeStartRulestring, read-only. titlestring, read-only. kiểu chữ, chỉ đọc. useTimedHyperlinksboolean, read-only

Internal State properties

currTimeThis provides read/write access to the local time for the element.   Reading this property provides the current time on the local timeline. Lưu ý rằng khi dòng thời gian cục bộ lặp lại, thuộc tính này hiển thị thời gian đơn giản nằm trong khoảng từ 0 đến thời lượng lặp lại.   Writing a value to this property will resync the element within the time container.   If the sync rules specify hard sync, the new value will be ignored.   The implementation could just raise a resync event and let the normal resync mechanisms deal with the new sync relationship, but this does not seem useful enough to justify the complexity or potential confusion in use. isPausedboolean that indicates whether the local element timeline is paused
Value is "true" if the element timeline is currently paused. Value is read-only (can be changed via the pause() and run() methods)

Test Attribute/Properties

Lưu ý rằng tất cả thuộc tính/thuộc tính được liên kết với thuộc tính thử nghiệm sẽ ở chế độ chỉ đọc. Tôi. e. các giá trị này không thể được đặt khác với cú pháp ban đầu. The test attributes and switch elements will only be evaluated once.   Any changes to attributes (e. g. via script) will have no effect upon the evaluation of a switch element

Nevertheless, there should be a mechanism for users to control the system settings for captioning and overdub support, in accordance with the WAI accessibility guidelines . Điều này có thể ở dạng kiểm soát hệ thống hoặc hỗ trợ tác nhân người dùng (trình duyệt) bổ sung để chỉ ra các phần tử có thuộc tính thử nghiệm được liên kết và cho phép kiểm soát động các phần tử này. Công việc tiếp theo là cần thiết trong lĩnh vực này

system-bitratestring, read-only. system-captionsstring ("on" or "off"), read-onlysystem-languagestring, read-only. system-overdub-or-captionstring ("chú thích" hoặc "overdub"), chỉ đọcchuỗi hệ thống yêu cầu, chỉ đọc. system-screen-sizestring (widthXheight), chỉ đọc. system-window-sizestring (widthXheight), chỉ đọc. system-screen-depthinteger, read-only

Events

Phần này trình bày tập hợp sự kiện cơ bản được liên kết với triển khai HTML+TIME.   Further work may be done to identify additional support required or recommended. Cụ thể, cần giải quyết các vấn đề liên quan đến tải phương tiện và quản lý băng thông, để giúp đảm bảo rằng bản trình bày phát lại tương tự trên các triển khai (trình duyệt) khác nhau

onBegin Tăng lên khi phần tử bắt đầu vì bất kỳ lý do gì - chỉ vì thời gian hoặc do cuộc gọi bật. onEndRaised khi phần tử dừng vì bất kỳ lý do gì - chỉ vì thời gian hoặc do lệnh gọi TurnOff. onRepeatRaised when the local timeline repeats (i. e. on the first sample of each repeat iteration after the first one). This is not raised when the local timeline starts (i. e. on the first iteration).   If the local timeline does not repeat, this event will never be raised
The event should include the iteration count (0 based, so the first event raised will have the value 1). onResyncRaised when a media player has broken sync for some internal reason, and when resync is called. Hành động mặc định của mô hình thời gian là cố gắng thiết lập lại đồng bộ hóa, tùy thuộc vào quy tắc tải phương tiện. As part of this, it will propagate any time dependencies. Sự kiện onResync nói chung sẽ nổi lên đến phần tử kèm theo đầu tiên được đặt thành đồng bộ hóa trượt
Sự kiện phải bao gồm thông tin về lý do đồng bộ lại (e. g. liên lạc, yêu cầu tạm dừng, v.v. ). Không rõ cách chỉ định điều này mà không có thông số kỹ thuật chính thức hơn về các sự kiện trong DOM. onMediaCompleteÁp dụng cho các phần tử media (đặc biệt là streaming media). Tăng lên khi phương tiện được tải xong.   This should generally be before the media is done playing, and will support implementations in optimizing media loading/buffering.   Intended use is that when, e. g. một video tải xong, video tiếp theo trong chuỗi có thể bắt đầu gợi ý hoặc đệm

It should be possible to integrate new media players into the HTML+TIME model, to support an open set of media types.   Media players generally support varying levels of control, depending on the constraints of the underlying renderer as well as media delivery, streaming etc. HTML+TIME xác định 4 cấp độ hỗ trợ, cho phép tích hợp ngày càng chặt chẽ và chức năng rộng hơn.   The details of the interface will be presented in a separate document.  

Cấp 0phải cho phép trình bao bọc phương tiện truy vấn trong thời lượng và phải hỗ trợ gợi ý, bắt đầu và dừng trên trình phát. To support reasonable resync, the player must provide pause/unpause controls with minimal latency. Đây là mức hỗ trợ tối thiểu được xác định. Level 1In addition to all Level 0 support, can detect when sync has been broken, so that a resync event can be fired. Trình phát đa phương tiện không thể hỗ trợ chức năng Cấp 1 có trách nhiệm duy trì đồng bộ hóa phù hợp trong mọi trường hợp và không có biện pháp khắc phục nếu không thể (khuyến nghị hỗ trợ Cấp 1). Level 2In addition to all Level 1 support, supports a tick() method for advancing the timeline in strict sync with the document timeline. This is generally appropriate to animation renderers that are not tightly bound to media delivery constraints. Level 3In addition to all Level 2 support, also supports a query interface to provide information about the time-related capabilities of the associated player. Các khả năng bao gồm những thứ như canRepeat, canPlayBackwards, canPlayVariable, canHold, v.v. This is mostly for future extension of the timing functionality and for optimization of media playback/rendering

HTML+TIME provides the underpinnings for time-based animation and interaction. Tác giả HTML và nhà cung cấp công cụ hoạt hình có thể xây dựng trên cơ sở này để cung cấp khả năng hoạt hình thông qua tập lệnh đơn giản hoặc hành vi DHTML. Từ quan điểm của HTML+TIME, những hành vi bổ sung này là khách hàng của các dịch vụ thời gian

Các hành vi của khách hàng phải có khả năng tận dụng hỗ trợ đồng bộ hóa và thời gian do HTML+TIME cung cấp. Các hành vi đơn giản hơn đáng kể so với trình phát đa phương tiện mở rộng và có giao diện đơn giản với HTML+TIME. Các hành vi thay đổi theo thời gian nên được mô hình hóa trên dòng thời gian cục bộ có thể được lấy mẫu tùy ý (i. e. no dependencies on the sample rate or the ordering of sample times).   Note that the implementation is not constrained by this requirement, and may be based upon interpolation, closest keyframe fit or random numbers. Các chi tiết của giao diện sẽ được mô tả trong một tài liệu riêng, nhưng cơ chế chung được mô tả tại đây

A client behavior will attach to the local timeline by calling an addClient method on the element. Khi dòng thời gian cục bộ tiến triển, hành vi HTML+TIME sẽ gọi lại phương thức hành vi của máy khách. cập nhật().   Parameters include the current local time, which the client behavior will use to sample its respective timeline. Reviewers. an alternative mechanism would simply present a tick event, simplifying the model somewhat. This could make it hard to handle resync situations, as the time-children are not registered. Opinions?

Một tập hợp các truy vấn cơ bản trên phần tử sẽ hỗ trợ thông tin về thời lượng dòng thời gian đơn giản, v.v.

Ghi chú. if behaviors are developed that require a broader interface to HTML+TIME, they can be modeled as media players

Issues

The syntax for declaring client behaviors is currently open.   XML and scene graph descriptions would describe them within the block (i. e. element) that they modify (act upon).   This also makes sense from the TIME standpoint, as they appear underneath (i. e. within) the local timeline of the modified element.   However, traditional HTML marks up content by wrapping it in a span.   This conflicts with the user-models generally used in animation and time-based media authoring

HTML Elements that are divided into two basic groups for the purposes of control by HTML+TIME behaviors

  1. Displayed elements that support the style parameters display and visibility - e. g. H1, P, img
  2. Style elements that modify the appearance of display elements - e. g. STYLE, FONT, B

The first group are controlled by manipulating the display or visibility properties.    The second group must be controlled by removing the effect of the element when it is not active on the timeline.   Thus the HTML+TIME behavior for a bold tag must remove the bold effect before the element is defined to begin and after it ends.   It should not force the style off in a manner that would override an enclosing style, but rather should simply remove the effect of the style element outside the active duration

There are some HTML tags that make no sense to integrate with a timeline, including those that occur within the HEAD, and some that affect neither display or content (e. g. COMMENT)

The classification of HTML elements is presented in

[ATVEF]"Advanced Television Enhancement Forum Specification"
Available at http. //www. atvef. com/atvef_spec/TVE-public. htm. [BEHAVIORS]"Element Behavior in CSS Proposal - June 10, 1998". Chris Wilson, editor
Available at http. //www. w3. org/Style/Group/1998/06/Behavior (W3C Members only). [HTML40]"HTML 4. 0 Specification", D. Raggett, A. Le Hors, I. Jacobs, 24 April 1998
Available at http. //www. w3. org/TR/REC-html40/. [ISO/IEC 10646]ISO (International Organization for Standardization). ISO/IEC 10646-1993 (E). Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1. Kiến trúc và mặt phẳng đa ngôn ngữ cơ bản. [Geneva]. International Organization for Standardization, 1993 (plus amendments AM 1 through AM 7). [NAMESPACES]"Không gian tên trong XML", T. Bray, D. Hollander, A. Layman, 27 March 1998
W3C working draft. Available at http. //www. w3. org/TR/WD-xml-names. [PICS]"PICS 1. 1 Label Distribution -- Label Syntax and Communication Protocols", 31 October 1996, T. Krauskopf, J. Miller, P. Resnick, W. Trees
Có sẵn tại http. //www. w3. org/TR/REC-PICS-labels-961031[RFC1766]"Tags for the Identification of Languages", H. Alvestrand, March 1995
Có sẵn tại ftp. // ftp. isi. edu/in-notes/rfc1766. txt. [RFC2045]"Phần mở rộng thư Internet đa năng (MIME) Phần thứ nhất. Format of Internet Message Body", N. Giải phóng và N. Borenstein, November 1996
Available at ftp. //ftp. isi. edu/in-notes/rfc2045. txt. Note that this RFC obsoletes RFC1521, RFC1522, and RFC1590. [SMIL]"Ngôn ngữ tích hợp đa phương tiện được đồng bộ hóa (SMIL) 1. 0 Thông số kỹ thuật Khuyến nghị W3C ngày 15 tháng 6 năm 1998 "
Có sẵn tại. http. //www. w3. org/TR/REC-smil. [SMIL-CSS]"Hiển thị bố cục cơ bản SMIL bằng Công cụ kết xuất CSS2"
Available at. http. //www. w3. org/TR/LƯU Ý-CSS-smil. html. [SMPTE]"Mã điều khiển và thời gian cho các hệ thống hình ảnh chuyển động 24, 25 hoặc 30 khung hình trên giây - RP 136-1995". Hiệp hội kỹ sư điện ảnh và truyền hình. [VML]"Vector Markup Language (VML)", World Wide Web Consortium Note 13-May-1998
Có sẵn tại http. //www. w3. org/TR/NOTE-VML[WAI]"WAI Accessibility Guidelines. Tác nhân người dùng", Dự thảo làm việc của W3C ngày 3 tháng 7 năm 1998
Có sẵn tại http. //www. w3. org/WAI/UA/WD-WAI-USERAGENT[XML10]"Extensible Markup Language (XML) 1. 0", chữ T. Bray, J. Paoli, C. M. Sperberg-McQueen, editors, 10 February 1998
Có sẵn tại http. //www. w3. org/TR/REC-xml/[XMLNS]"Không gian tên trong XML World Wide Web Consortium Working Draft 2-August-1998 ", W3C XML Working Group
Có sẵn tại http. //www. w3. org/TR/WD-xml-names[XMLinHTML]"Báo cáo cuộc họp XML trong HTML ", ghi chú của W3C  ngày 11 tháng 5 năm 1998
Available at http. //www. w3. org/TR/NOTE-xh

Mỗi phần tử HTML được phân loại theo loại (cách thức) kiểm soát HTML+TIME.  

Điều quan trọng cần lưu ý là một số yếu tố có thể được coi là phong cách hoặc nội dung. Một cuộc gọi phán đoán được thực hiện để phân loại chúng theo loại hợp lý hơn.   Thus, BLOCKQUOTE, LISTING and PRE are classified as content (as they function more like a P element than a font style element), and

...

This is some text that appears immediately and remains visible for 5 seconds.

Thời gian có nghĩa là gì trong HTML?

This is some text that appears just before the first paragraph goes away (i.e. at 4.5 seconds) and remains visible indefinitely. Note the support for negative offsets.

...
9 (although a block element) is classified as a style

Hai phần tử không được tính trong các tập hợp dưới đây. COL và COLGROUP.   Some documentation states that the visibility property applies to these elements. Điều này có thể xếp chúng vào nhóm nội dung, mặc dù chúng không thực sự chứa nội dung theo cách mà hầu hết các thành phần nội dung đều làm. Điều này cần được quan tâm hơn nữa

Lưu ý rằng sẽ rất tuyệt nếu hỗ trợ nội dung SCRIPT được định thời gian. Cần xem xét mô hình đánh giá chậm, đánh giá lặp lại, v.v. Việc lặp lại tập lệnh (với một số thời lượng giả được khai báo) có hợp lý không?

Các loại được xác định là

contentAn element that is used (primarily) to contain content. Các phần tử nội dung được kiểm soát bởi HTML+TIME bằng cách sử dụng thuộc tính khả năng hiển thị và thuộc tính hiển thị nếu được hỗ trợ
The set of content elements includes

APPLET, BLOCKQUOTE, BODY, BUTTON, CAPTION, CITE, CODE, DD, DIR, DIV, DL, DT, FIELDSET, FORM, H1-6, HR, HTMLAREA, IFRAME, IMG, INPUT, LEGEND, LI, LISTING, MARQUEE,

styleMột phần tử được sử dụng (chủ yếu) để mô tả phong cách của nội dung. Các phần tử kiểu được kiểm soát bởi HTML+TIME bằng cách loại bỏ hiệu ứng của kiểu khi phần tử không hoạt động trên dòng thời gian và bằng cách áp dụng kiểu khi phần tử đang hoạt động. The intended result is that "removing the effect" of a style element will not override inherited style
Lưu ý rằng đối với A và AREA, việc xóa kiểu có nghĩa là siêu kết nối cũng bị tắt
Tập hợp các yếu tố phong cách bao gồm

A, VIẾT TẮT, ĐỊA CHỈ, KHU VỰC, B, LỚN, TRUNG TÂM, DEL, EM, FONT, I, INS, KBD, PLAINTEXT, Q, S, NHỎ, ĐÁNH, MẠNH, SUB, SUP, TT, U, VAR, XMP

dòng thời gianĐây là các phần tử FRAME và FRAMESET. Cả hai phải theo định nghĩa xác định một dòng thời gian mới.   They are content, but also define a timeline by default (just as the document. body element defines the root timeline)
head-onlyMột phần tử chỉ hợp pháp trong phần đầu của tài liệu và sẽ không bị kiểm soát bởi HTML+TIME.   These elements do not appear in the document body, and so cannot participate on the document timeline
Tập hợp các phần tử chỉ đầu bao gồm

BASE, BASEFONT, BGSOUND, DOCTYPE, LINK, META, STYLE, TITLE

noneAn element that will not be controlled by HTML+TIME.   These are elements that are orthogonal to the document display and/or which do not support any sort of display controls.   Most are logical elements
Tập hợp các phần tử của loại không bao gồm

BR, COMMENT, DFN, EMBED, HEAD, HTML, ISINDEX, LABEL, MAP, NOBR, NOFRAMES, NOSCRIPT, OBJECT, PARAM, SCRIPT, WBR

HTML+TIME is based in large part upon SMIL, and so the core syntax is very similar.   Because of the integration with HTML and CSS, the SMIL layout syntax and some SMIL boilerplate syntax is not needed. Tuy nhiên, một số khác biệt trong cú pháp thời gian được giới thiệu.   In some cases, these changes allow the syntax to match the HTML Document Object Model (DOM) in a more standard manner.   In other cases, HTML+TIME extends the SMIL functionality to support more control and integration with a document time model.   We have attempted to keep the extensions within the overall SMIL model, so that they could be worked into the SMIL specification as well

Because layout is handled by existing HTML/CSS mechanisms, there is no layout section as there would be in SMIL documents.  HTML+TIME marks up existing HTML with inline timing info, and so effectively integrates layout and timing. Điều này giữ tất cả các thông tin liên quan đến một yếu tố cùng nhau. Điều này có thể làm cho việc chỉnh sửa trở nên đơn giản và dễ dàng hơn

Một lưu ý nhỏ, cách đặt tên SMIL (sử dụng dấu gạch nối) dường như tuân theo cách đặt tên thuộc tính CSS, mâu thuẫn với cách đặt tên thuộc tính HTML. HTML+TIME giữ nguyên các tên SMIL có dấu gạch ngang để tương thích, nhưng sử dụng tiêu chuẩn đặt tên HTML cho các thuộc tính mới

One significant difference between HTML+TIME and SMIL is the description of an Object Model.   This is appropriate in the HTML environment, and should support platform implementers as well as authors

This appendix details the differences between the two specifications

Các phần tử SMIL không được hỗ trợ trong HTML+TIME

Các phần tử được gộp bởi HTML/CSS

These elements are not needed, as the equivalent functionality is already in HTML and/or CSS. Không có tổn thất chức năng trong việc không hỗ trợ những. Các yếu tố được trình bày theo thứ tự chúng xuất hiện trong SMIL 1. 0 đặc điểm kỹ thuật

smilKhông cần điều này trong HTML. headHTML định nghĩa phần tử tương đương. layoutTất cả bố cục được xử lý nội tuyến bởi HTML/CSS. khu vực Tất cả bố cục được xử lý nội tuyến bởi HTML/CSS. SMIL xác định một thuộc tính "phù hợp" không được hỗ trợ trực tiếp trong CSS. Trích dẫn từ SMIL 1. 0 thông số kỹ thuật. "Thuộc tính này không có ánh xạ 1-1 lên thuộc tính CSS2, nhưng có thể được mô phỏng trong CSS2". bố cục gốcTất cả bố cục được xử lý nội tuyến bằng HTML/CSS. metaHTML định nghĩa phần tử tương đương. bodyHTML định nghĩa phần tử tương đương. textHTML xác định một loạt các phần tử tương đương cho nội dung văn bản tĩnh. Lưu ý rằng dòng văn bản vẫn được bao gồm trong HTML+TIME. HTML đã định nghĩa thẻ này rồi, với chức năng tương đương. SMIL định nghĩa một thuộc tính bổ sung "show", với ba giá trị. Hai trong số các giá trị - "thay thế" và "mới" - trùng lặp một phần chức năng của thuộc tính "đích" trên thẻ HTML. Giá trị thứ ba - "tạm dừng" có thể được hỗ trợ trong hầu hết các trường hợp bằng tập lệnh đơn giản. Trong một số trường hợp nhất định, việc hỗ trợ (e. g. tạm dừng một phiên bản trình duyệt để chờ phiên bản khác). anchorChức năng tương đương được hỗ trợ bởi bản đồ hình ảnh, với các yếu tố khu vực hỗ trợ giới hạn thời gian và không gian trên liên kết

Thuộc tính phần tử được gộp bởi HTML/CSS

idÁp dụng cho các phần tử nội dung. HTML hỗ trợ điều này. altÁp dụng cho các phần tử phương tiện. HTML hỗ trợ điều này

Thuộc tính phần tử bị bỏ qua

regionApplies to content elements. Vì bố cục được xử lý nội tuyến nên điều này không còn áp dụng nữa

Phần mở rộng HTML+TIME cho SMIL

Các phần tử SMIL với cú pháp/ngữ nghĩa mở rộng

Các phần tử này được hỗ trợ trong HTML+TIME, nhưng có hỗ trợ bổ sung hoặc cú pháp sửa đổi. Chức năng do SMIL xác định được duy trì bởi HTML+TIME. Các yếu tố được trình bày theo thứ tự chúng xuất hiện trong SMIL 1. 0 đặc điểm kỹ thuật

parHTML+TIME hiển thị tương đương dưới dạng thuộc tính ("par") trên bộ chứa HTML. Điều này đơn giản hóa cú pháp và duy trì chức năng của mệnh
Một vấn đề mở là hỗ trợ cho một phần tử tương đương với mệnh giá. mediaThis có chức năng tương đương với phần tử "ref" trong SMIL, nhưng cung cấp một cái tên trực quan hơn. switchHTML+TIME chỉ hỗ trợ điều này trong phần thân, trong đó SMIL cũng hỗ trợ nó trong phần đầu (nhưng chỉ dành cho bố cục, được xử lý nội tuyến trong phần thân của HTML)
HTML+TIME không hạn chế phần tử con là phần tử SMIL mà hỗ trợ phần tử nội dung. Điều này có thể cần xem xét thêm để xác định các hạn chế đối với các phần tử HTML hợp pháp

Thuộc tính phần tử SMIL với cú pháp/ngữ nghĩa mở rộng

beginHTML+TIME cho phép các giá trị đồng hồ đã ký. endHTML+TIME cho phép các giá trị đồng hồ đã ký
Định nghĩa SMIL về kết thúc ẩn dường như yêu cầu một phần tử có thuộc tính repeat="indefinite" biến mất ngay lập tức nếu không chỉ định kết thúc hoặc thời lượng. Điều này có vẻ chống chỉ định
Định nghĩa SMIL về kết thúc ẩn không tính đến việc sử dụng clip-bắt đầu và kết thúc clip. Không rõ các thuộc tính này dự định tương tác với kết thúc và thời lượng như thế nào.   This is defined in HTML+TIME. lặp lại hỗ trợ số lần lặp lại theo phân số, đặc biệt đối với hoạt ảnh và các trường hợp tương tự. mở rộng định nghĩa giá trị clip-beginClock (được mô tả bên dưới). mở rộng định nghĩa giá trị clip-endClock (được mô tả bên dưới)
Rules for error handling defined (missing in SMIL). fillExtended to support media load/resync gaps (in addition to defined timing gaps as SMIL describes)
Các giá trị bổ sung được xác định
mở rộng - mở rộng dòng thời gian cục bộ để lấp đầy khoảng trống (hữu ích cho nhiều yếu tố tĩnh và một số hoạt ảnh)
lặp lại - lặp lại dòng thời gian cục bộ để lấp đầy khoảng trống

Định nghĩa giá trị thuộc tính SMIL với cú pháp/ngữ nghĩa mở rộng

giá trị đồng hồCho phép số liệu mặc định của thời gian đồng hồ, không có bộ xác định số liệu (đơn giản hóa các trường hợp phổ biến)
Thay thế tên chỉ số "npt" bằng "đồng hồ" để dễ học
Giờ không giới hạn 2 chữ số và không bắt buộc phải có số 0 đứng đầu. giá trị thời gian clip Cho phép số liệu mặc định về thời gian của đồng hồ, không có bộ xác định ma trận (đơn giản hóa các trường hợp phổ biến)
Thay thế tên chỉ số "npt" bằng "đồng hồ" để dễ học
Thêm số liệu bổ sung Index-val và timeID-val
Giờ (tính bằng smpte val) không giới hạn ở 2 chữ số và không bắt buộc phải có số 0 đứng đầu. giá trị sự kiện phần tửCú pháp phù hợp với CSS/script thông thường
Đã mở các sự kiện được phép để bao gồm tất cả các sự kiện pháp lý DOM. Lưu ý rằng các sự kiện thời gian ("bắt đầu" và "kết thúc") giữ lại các ràng buộc SMIL
SMIL định nghĩa diễn giải "phụ thuộc vào việc triển khai" các sự kiện clock-val. Định nghĩa dường như cho phép thời gian thay đổi rộng rãi tùy thuộc vào cách diễn giải (cho phép tham chiếu đến thời gian của phương tiện) và dường như chống chỉ định
SMIL khiến việc tham chiếu thời gian lớn hơn thời lượng đã xác định cho một phần tử là bất hợp pháp. Điều này loại trừ tham chiếu đến thời gian cục bộ được mở rộng để lấp đầy khoảng trống hoặc để khắc phục sự cố tải/đồng bộ lại phương tiện. Hạn chế này không có trong HTML+TIME

Thuộc tính phần tử mới được giới thiệu bởi HTML+TIME

beginWithNói chung, HTML và DOM tách các thuộc tính riêng lẻ thành các thuộc tính riêng lẻ. Để phù hợp với điều này, beginWith trình bày cơ sở thời gian bắt đầu được biểu thị bằng thời gian SMIL liên quan đến "sự kiện bắt đầu phần tử". beginafterThis trình bày cơ sở thời gian bắt đầu được biểu thị bằng thời gian SMIL liên quan đến "sự kiện kết thúc phần tử". beginEventThis thể hiện thời gian tương đương với "sự kiện phần tử" trong SMIL và thêm hỗ trợ cho bất kỳ sự kiện pháp lý DOM nào. Nó cũng cho phép giá trị "none" cho thời gian bắt đầu không xác định thuần túy. endWithThis presents the end-time base represented by the SMIL timing relative to "element end event". endEventThis presents the equivalent of "element event" timing in SMIL, and adds support for any DOM-legal event. Nó cũng cho phép giá trị "none" cho thời gian kết thúc thuần túy không xác định. repeatDurĐiều này cho phép đặc tả lặp lại theo tổng thời lượng. timeActionXác định thời gian ảnh hưởng đến các phần tử HTML như thế nào. parXác định vùng chứa HTML là dòng thời gian cục bộ (chức năng tương đương với phần tử "par" trong SMIL). imgApplies to visual media elements (video, animation). Xác định một hình ảnh thay thế để hiển thị nếu không thể hiển thị phương tiện. noCombineÁp dụng cho tất cả các yếu tố phương tiện. Gợi ý triển khai để loại trừ khả năng tối ưu hóa. hành vi đồng bộ hóa Chỉ áp dụng cho phần tử cơ thể. Xác định hành vi đồng bộ hóa cho một phần tử. dung sai đồng bộ Chỉ áp dụng cho phần tử cơ thể. Xác định dung sai cho phép để đồng bộ hóa. clockSourceDefines associated media element as synchronization master. thuộc tính system-window-sizeTest. Tương tự như kích thước màn hình hệ thống, nhưng đối với kích thước cửa sổ trình duyệt

Điều này sẽ hiển thị DTD cho tất cả các phần tử HTML+TIME mới. Nó sẽ không cung cấp phương tiện xác minh toàn bộ tài liệu HTML với phần mở rộng TIME, nhưng sẽ hỗ trợ xác minh các phần tử mới

Consider Accessibility issues. Xem thêm http. //www. w3. org/WAI/UA/WD-WAI-NGƯỜI DÙNG. html. Cụ thể, hãy xem xét các vấn đề liên quan đến tiêu đề, longdesc và các điều khiển cho phụ đề. Ngoài ra, các khuyến nghị mô tả nhu cầu về "một phương tiện tiêu chuẩn để thông báo cho các công nghệ hỗ trợ của bên thứ ba. về sự tồn tại của mô tả âm thanh cho một đối tượng video" (và các proxy liên quan). Điều này có nên được kết hợp bằng cách nào đó vào thuộc tính thử nghiệm do hệ thống yêu cầu hay nên tạo một thuộc tính thử nghiệm mới cho loại điều này?

Cân nhắc thêm hỗ trợ tăng tốc/giảm tốc. Điều này rất mạnh mẽ đối với các tập lệnh hoặc hành vi của khách hàng và họ khó có thể làm khác. Nó chỉ nên là một gợi ý (dù sao thì nó cũng sẽ không bao giờ ảnh hưởng đến thời lượng), để nếu được áp dụng cho thứ gì đó như trình phát phim, nó có thể bị bỏ qua mà không ảnh hưởng đến biểu đồ thời gian. Hỗ trợ được đề xuất sẽ là một thuộc tính có giá trị phần trăm. Giá trị là phần của khoảng thời gian cục bộ mà quá trình tăng tốc hoặc giảm tốc sẽ được áp dụng. Hiệu ứng sẽ sửa đổi tốc độ phát phần tử sao cho thời lượng được giữ nguyên. Tổng của bất kỳ giá trị gia tốc và giảm tốc nào cho một phần tử không được lớn hơn 100

Xem xét thêm hỗ trợ cho quá trình chuyển đổi. Chúng ta không nên đi quá xa với điều này, nếu không HTML+TIME sẽ bắt đầu trùng lặp với các công cụ tạo hoạt ảnh và video. Tuy nhiên, sẽ rất tuyệt nếu chỉ định một số hành vi giữa các video theo thứ tự, v.v.   Simple fades, cross-fades, etc. Nếu được mô hình hóa dưới dạng gợi ý, thay vì yêu cầu, có thể dễ xử lý hơn. Getting into full effects and wipes makes less sense.   What about layering and opacity?  For Enhanced TV, transparency would be important (content screened over the BG video).  

Cần thêm tài liệu về Mô hình đối tượng, đặc biệt là w. r. t. hành vi trẻ em và tích hợp trình phát đa phương tiện. Cần mô tả các thuộc tính liên kết với các thuộc tính. Cần thêm định nghĩa chặt chẽ hơn về những gì xảy ra khi lặp lại và cách điều này tương tác với đồng bộ hóa và đồng bộ hóa lại.   Need to resolve how time children attach to time parents (e. g. update() call versus tick event)

What is time in HTML?

Definition and Usage The datetime attribute represent a machine-readable format of a . Examples of valid datetime values. Dates.

How to include time in HTML?

The defines a control for entering a time (no time zone). Tip: Always add the

What is the Times icon code?

"Unicode Character 'MULTIPLICATION SIGN' ( U+00D7 )".

What is the Times symbol in Javascript?

The multiplication ( * ) operator produces the product of the operands.