|
@@ -2286,7 +2286,7 @@ var Reveal = (function(){
|
|
|
element.removeAttribute( 'data-src' );
|
|
|
} );
|
|
|
|
|
|
-
|
|
|
+
|
|
|
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( media ) {
|
|
|
var sources = 0;
|
|
|
|
|
@@ -2634,6 +2634,38 @@ var Reveal = (function(){
|
|
|
|
|
|
}
|
|
|
|
|
|
+ function getSlide( x, y ) {
|
|
|
+
|
|
|
+ var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ];
|
|
|
+ var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' );
|
|
|
+
|
|
|
+ if( typeof y === 'number' ) {
|
|
|
+ return verticalSlides ? verticalSlides[ y ] : undefined;
|
|
|
+ }
|
|
|
+
|
|
|
+ return horizontalSlide;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * Returns the background element for the given slide.
|
|
|
+ * All slides, even the ones with no background properties
|
|
|
+ * defined, have a background element so this never returns
|
|
|
+ * null.
|
|
|
+ */
|
|
|
+ function getSlideBackground( x, y ) {
|
|
|
+
|
|
|
+ var horizontalBackground = document.querySelectorAll( '.backgrounds>.slide-background' )[ x ];
|
|
|
+ var verticalBackgrounds = horizontalBackground && horizontalBackground.querySelectorAll( '.slide-background' );
|
|
|
+
|
|
|
+ if( typeof y === 'number' ) {
|
|
|
+ return verticalBackgrounds ? verticalBackgrounds[ y ] : undefined;
|
|
|
+ }
|
|
|
+
|
|
|
+ return horizontalBackground;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
* Retrieves the current state of the presentation as
|
|
|
* an object. This state can then be restored at any
|
|
@@ -3720,17 +3752,11 @@ var Reveal = (function(){
|
|
|
|
|
|
getTotalSlides: getTotalSlides,
|
|
|
|
|
|
-
|
|
|
- getSlide: function( x, y ) {
|
|
|
- var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ];
|
|
|
- var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' );
|
|
|
-
|
|
|
- if( typeof y !== 'undefined' ) {
|
|
|
- return verticalSlides ? verticalSlides[ y ] : undefined;
|
|
|
- }
|
|
|
+
|
|
|
+ getSlide: getSlide,
|
|
|
|
|
|
- return horizontalSlide;
|
|
|
- },
|
|
|
+
|
|
|
+ getSlideBackground: getSlideBackground,
|
|
|
|
|
|
|
|
|
getPreviousSlide: function() {
|