Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Play Feature #101

Open
vignxs opened this issue Feb 17, 2024 · 0 comments
Open

Auto Play Feature #101

vignxs opened this issue Feb 17, 2024 · 0 comments

Comments

@vignxs
Copy link

vignxs commented Feb 17, 2024

below is my code , i want to achive auto play feature like slider auto play , how can I do it ? is it already there?
thanks in advance

<Document file={selectedFile} onLoadSuccess={onDocumentLoadSuccess}>
              <Page
                pageNumber={pageNumber}
                renderTextLayer={false}
                renderAnnotationLayer={false}
                width={250}
                className="custom-page"
              />
            </Document>
          )}
        </Box>
      )}
      {selectedFile && !selectedFile.type.startsWith("image/") && (
        <Stack sx={{ pt: 2 }} direction="row" gap={2} alignItems={"center"}>
          <IconButton
            color="primary"
            onClick={() => {
              if (pageNumber > 1) {
                setPageNumber(pageNumber - 1);
              }
            }}
            disabled={pageNumber === 1}
          >
            <ArrowBackIosIcon />
          </IconButton>
          {pageNumber} of {numPages}
          <IconButton
            color="primary"
            onClick={() => {
              if (numPages && pageNumber < numPages) {
                setPageNumber(pageNumber + 1);
              }
            }}
            disabled={pageNumber === numPages}
          >
            <ArrowForwardIosIcon />
          </IconButton>
        </Stack>````
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant